In another of my previous mentions, we discussed hard-coded game lengths by sport. I've spent some (more) time learning how bits and pieces fit together and done up a diff (including a small DB change required -- adding a single column to the "divisions" table) that handles this by sport (first) and then by division.
This diff on github covers it off.
https://github.com/sulfurchesh/Zuluru_b ... cc64f78520
If you've got any questions, don't hesitate to ask.
Code Submission: Configurable game lengths by sport/division
Re: Code Submission: Configurable game lengths by sport/divi
Thanks, I'm in the middle of some other changes at the moment, but should get to merging in this and the earlier diff around the middle of the month.
Re: Code Submission: Configurable game lengths by sport/divi
No worries. By the time you get to that, I'm hoping to have the gender showing thing sorted out too (now that I think I understand how things interact!).
Once all that is done, I'm going to put together a single, clean diff for you for the Futsal sport. I've tried to keep that separate from the other stuff along the way because I'm still tweaking it as we discover what works and what doesn't (almost entirely around the stat keeping, obviously).
Once all that is done, I'm going to put together a single, clean diff for you for the Futsal sport. I've tried to keep that separate from the other stuff along the way because I'm still tweaking it as we discover what works and what doesn't (almost entirely around the stat keeping, obviously).
Re: Code Submission: Configurable game lengths by sport/divi
So, apparently I'm an idiot and my testing was not testing the correct thing. Go me.
*sigh*
I'm got code where I've got the game_id and team_id -- is there a way to get the Division information (and thus a divisional setting) out of these? I don't see anything obvious.
*sigh*
I'm got code where I've got the game_id and team_id -- is there a way to get the Division information (and thus a divisional setting) out of these? I don't see anything obvious.
Re: Code Submission: Configurable game lengths by sport/divi
There's no function that does that right now. You could do something (either a function or just inline code) like the Game::affiliate function, or maybe it would make more sense to add the Division to the "contain" phrase wherever the game is being loaded?