At the moment, the scoring methods for a match are very limited. The result of a match is entered in points, and thats it.
Personally, this means I cant yet consider adding a 'bonus point' scheme which is run in rugby. As I would need to know the scoring breakdown to do this.
I like the fact that I can enter the results of multiple matches at once on the match admin screen, so adding more details there would not be needed, but in the advanced view of a match, I think one should be able to add a scoring breakdown (e.g., lets say for american football, touchdowns, conversions and field goals) and not just the end result.
In the long term view of the module (when players are added as nodes), one could also assign players to a score.
I'm going to have to make some changes to the database structure and improve the scoring method for this. It would also be cool to be able to customise the league table display according to the sport (e.g. does everybody want to view played, lost, won, drawn, points for, points against? or would you like to customise it?)
This is something I will need to work on. Any input will be appreciated.

Comments

Alun’s picture

I have thought out a database structure to allow scoring to take place. The tables added will be below.
The module will be an option to add onto matches, kind of a match attribute.

The table names aren't finalised, but this is basically what they are going to look like,

leaguesite_method will hold the names and points value of a score type in a match. For example, a try in rugby is 5 points. A touchdown in american football is worth 6 points
------------------------------------
| leaguesite_method |
------------------------------------
| id
| name
| points
------------------------------------

leaguesite_sport already exists, and holds the points for a win, loss and draw in a standings table. The score attributes will bolt onto this, so will add on nicely to existing league tables as an optional module.
--------------------------
| leaguesite_sport |
--------------------------
| id
| name
| win
| loss
| draw
--------------------------

leaguesite_sport_method will tie the two tables together, so multiple score types can be linked to one league. eg, you can have a try, penalty and converted try in rugby.
------------------------------------
| leaguesite_sport_method |
------------------------------------
| id
| sport_type_id
| scores_id
------------------------------------

Once the scoring methods are created, I will need to tie this in to actual results, so I will have an additional table called match_attribute. This will be structured as so

The table will contain the sport score id, referencing the name and value of the score, and the number of scores. The field match_id will then allow me to link to a particular match.
--------------------------------------
| leaguesite_match_attribute |
--------------------------------------
| id
| sport_score_id
| match_id
| team_id
| number
--------------------------------------

The good thing about the way this links in, is that it allows me to add players to each individual score later, so detailed match reports are possible in the future.

I hope this makes sense of what I am going to create. I will hopefully get this up and running within the month.

zeezhao’s picture

By the way, how different is this module from:

http://drupal.org/project/sport

Alun’s picture

Hi zeezhao,

I imagine I will get a lot of questions regarding the similarity between the Sports Club Management module and this one.
To tell you the truth, I was going to assist on development of the sports club management module before I found this one, as I thought they were the same also! But since I have started this module, it is clear there are some very defined differences.
Firstly, on the Sports Club Management module page (http://www.drupal.org/project/sport) the maintainer states that

This project offers a set of modules to manage a sports club.

Where I intend to allow a user to manage one or multiple Leagues not one particular club or team.
Due to this organisation, the table of results you can create using the sports management module does not update when you enter a match result. (http://drupal.org/node/629760)

Rotzl, the maintainer has stated that you can manage multiple teams and leagues on one site, but the permissions for entering results is not massively implemented (#563824), where as I have made it possible on my module to grant result-entering permissions for a teams owner.

Essentially, if you are looking to manage a club, who plays in a team, the sports management module is for you.
If you are looking to manage a league, which contains multiple teams, then you should consider using my module.

From my experience using Sports Management Module, I found that the installation process was quite buggy, and the dependencies on various modules is not a fun thing to have to deal with. I created this module to be a standalone league manager with a few dependencies on other modules for such features such as views. As a result, you might find it easier to install. Credit to Rotzl however for creating such a complex and expansive sport managment module.

In time, I would not be surprised if the two modules grow to be very similar, but for now, there are some clear differences between them.
I hope that answers your question?
Thanks
Alun

zeezhao’s picture

Thanks for your reply. Its now clear...

If you have a demo or site currently using leaguesite, please post the link so i can take a look at it. Thanks.

Alun’s picture

Cool, I don't currently have a demo site, but in the summer, I should have one. I am working towards a stable beta or 1.0 release for the summer, which I can implement on my project website. Until then I don't have anything.
Thanks
Alun

Alun’s picture

Status: Active » Postponed

I'm gonna postpone this scoring methods for a week or so, I'm focusing on getting alpha2 out first, which won't be long.

Alun’s picture

Status: Postponed » Active

I have started developing this in the latest build - nothing has been committed yet.
I have created a new module for it, as an add on for LeagueSite, which means people can just stick with the current structure if desired.
I will post more information here when I progress on things. I should get some sorted on the weekend - I have a long train journey which I can fill with coding time!

Alun’s picture

As stated above, I have had some time to kick off this. I will probably be renaming a few items in the current structure, which I will do, but at the moment, I just committed the start of a module called leaguesite_scoring. This doesn't work fully yet, but will allow people to add scoring breakdowns to matches. I'll post more as I work on it, probably more to arrive on Sunday if I get on the net.

Alun’s picture

Just to keep this thread updated, I have added the scoring attributes to the latest dev. Its not complete, I am currently working on views implementation. Hopefully it should be finished soon.
Al

Alun’s picture

Status: Active » Fixed

Find match attributes available in the latest development snapshot, soon to be alpha3, as long as I don't have any problems reported!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.