Closed BrandonLMorris closed 7 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.
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.
So here's my thinking for this one: the way I see it this is two sub-tasks.
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?
Is this issue complete?
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.