cms-dev/cms — pull request #179 by fagu (2013-07-30 16:03:27+00:00)
Title: User groups for timing

I wanted to propose the introduction of "user groups". This means that the `start` and `stop` time and the `per_user_time` is not specified for a contest but for groups of users. This might be useful for two reasons:

1. In the German selection camps, we sometimes had some contestants which were unable to attend them. They were admitted to take part online, often after the exam at the camp.
2. It would be nice to have test users that are able to submit before the contest starts and after it ends.

As an exercise in understanding the CMS code, I already implemented this feature. It basically seems to work but it is missing documentation and the test suite has not been adapted. Before doing this, I wanted to ask for your opinions.

One problem that arises when introducing user groups is that there are some places in the interface, where user-independent contest start and stop times are needed, for example the "Time left: ..." message in the admin interface and on the rankings page. To this end, I added a `main_group_id` column to the contest table, which specifies which group's timing to use in such cases. This is of course not optimal. For example, the submission time shown on the rankings page is incorrect; that problem already arised with USACO timing, however.