Code Submission: Configurable game lengths by sport/division

Questions about modifications to Zuluru code, to add or change features
Post Reply
sulfur
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Code Submission: Configurable game lengths by sport/division

Post by sulfur »

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.
GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Code Submission: Configurable game lengths by sport/divi

Post by GregS »

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.
sulfur
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Re: Code Submission: Configurable game lengths by sport/divi

Post by sulfur »

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).
sulfur
Posts: 38
Joined: Fri Nov 08, 2013 3:08 pm
Location: Kingston, ON

Re: Code Submission: Configurable game lengths by sport/divi

Post by sulfur »

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.
GregS
Site Admin
Posts: 240
Joined: Thu Jan 06, 2011 4:58 pm

Re: Code Submission: Configurable game lengths by sport/divi

Post by GregS »

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?
Post Reply