- 
                Notifications
    You must be signed in to change notification settings 
- Fork 31
Description
We recently added in code to switch over the Game Flag Submissions and Team Flag Submissions graphs over from grouping data by hours to grouping data by days automatically. When doing this I didn't take into account how slow/fast paced the game could be. The automatic switchover is after 7 days, and on one currently running competition the graphs now look as follows:
Instead of switching over automatically we basically need to add something similar to the following code
[:hours, :days].each do |period|
    @team_flags_per_hour = @team.submitted_flags_per_hour(period)
    @team_solves_per_hour = @team.solved_challenges_per_hour(period)
    break unless max(@team_flags_per_hour, @team_solves_per_hour) > THRESHOLD
endWe need to figure out what a reasonable THRESHOLD is above (probably by manually testing different amounts of data).
Also we need to rename submitted_flags_per_hour and solved_challenges_per_hour since they aren't really by hour anymore, they are by the period passed into them.

