AuburnACM / auacm

The Auburn ACM Website
Apache License 2.0
15 stars 3 forks source link

Problems should be releaseable with competitions #45

Closed BrandonLMorris closed 7 years ago

BrandonLMorris commented 8 years ago

Like the old website, a newly minted problem should be able to be associated with a (future) competition, and should remain hidden until that competition starts.

WilliamHester commented 8 years ago

It looks like we can solve this problem by doing another left join from the problems table to the comp_names table and checking to see that the current time is greater than the start time of the start time of the competition. I guess that we should wait to do this until it's easier to make a competition in the future though.

BrandonLMorris commented 8 years ago

Well the real problem I was addressing was that a new problem is viewable in the global problem list. But you raise a good point: The competition page shouldn't link to the problems until the competition starts either.

BrandonLMorris commented 8 years ago

So here's my thinking for this one: the way I see it this is two sub-tasks.

  1. Problems associated with competitions that have not started should not be visible to a client
  2. Once a competition starts, the previously hidden problems should now be visible

It seems like making one easier will make the other one more difficult. For instance, we could set competitions that haven't started yet to have a competition id that's negative of what it really should be, and the filter API calls to exclude problems that have a comp_release that's less than zero. The issues is switching those cid's back once the competition starts: it will require a time-based execution rather than our typical event-driven execution.

On the other hand, we can simply check if the competition associated with a problem has begun with the start times. This would relieve us having to make modifications at a competition start, but would require that every API call associated with a problem also looks at the competition table.

Thoughts?

Mac-Genius commented 7 years ago

Is this issue complete?