Skip to content

Commit 2ab01e5

Browse files
stefano-maggiologiomasce
authored andcommitted
Proposal for detailed timing documentation.
1 parent 42f2eff commit 2ab01e5

2 files changed

Lines changed: 98 additions & 0 deletions

File tree

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
Detailed timing configuration
2+
*****************************
3+
4+
When setting up a contest, you will need to decide the time window in
5+
which contestants will be able to interact with the contest (by
6+
reading statements, submit solutions, ...). In CMS, there are several
7+
parameters that allow to control this time window, and also allow to
8+
personalize it for every user in case it is needed.
9+
10+
The first decision to chose among these two possibilities:
11+
12+
#. all contestants will start and end the contest at the same time
13+
(unless otherwise decided by the admins during the contest for
14+
fairness reasons);
15+
#. each contestant will start the contest at the time she decide.
16+
17+
The first situation is that we will refer to as a fixed-window
18+
contest, whereas we will refer to the second situation as
19+
customized-window contest.
20+
21+
Fixed-window contests
22+
=====================
23+
24+
These are quite simple to configure: you just need to set
25+
``start_time`` and ``end_time``, and by default all users will be able
26+
to interact with the contest between these two instants.
27+
28+
For fairness reasons, during the contest you may want to extend the
29+
time window for all or for particular users. In the first case, you
30+
just need to change the end_time parameter. In the latter case, you
31+
can use one of two slightly different per-contestant parameters:
32+
``extra_time`` and ``delay_time``.
33+
34+
You can use ``extra_time`` to award more time at the end of the
35+
contest for a specific contestant, whereas you can use ``delay_time``
36+
to shift in the future the time-window of the contest just for that
37+
user. There are two main practical differences between these two
38+
options.
39+
40+
#. If you set ``extra_time`` to S seconds, the contestant will be able
41+
to interact with the contest in the first S seconds of it, whereas
42+
if you use ``delay_time``, she will not, as in the first case the
43+
time-window is extended, in the second is shifted (if S seconds
44+
have already passed from the start of the contest, then there is no
45+
difference).
46+
47+
#. If tokens are generated every M minutes, and you set ``extra_time``
48+
to S seconds, then tokens for that contestants are generated at
49+
``start_time`` + k*M (in particular, it might be possible that more
50+
tokens are generated for contestants with ``extra_time``); if
51+
instead you set ``delay_time`` to S seconds, tokens for that
52+
contestants are generated at start_time + S + k*M (i.e., they are
53+
shifted from the original, and the same amount of tokens will be
54+
generated regardless of the other settings).
55+
56+
Of course it is possible to use both at the same time, but we do not
57+
see much value in doing so.
58+
59+
Customized-window contests
60+
==========================
61+
62+
In these contests, contestants can use a time-window of fixed length
63+
(``per_user_time``), starting from the first time they log in between
64+
start_time and end_time. Moreover, the time-window is capped at
65+
``end_time`` (so if ``per_user_time`` is 5 hours and a contestant logs
66+
in for the first time one minute before ``end_time``, she will have
67+
just one minute).
68+
69+
Again, admins can change the time-windows of specific contestants for
70+
fairness reasons. In addition to ``extra_time`` and ``delay_time``,
71+
they can also use ``starting_time``, which is automatically set by CMS
72+
when the contestant logs in for the first time.
73+
74+
The meaning of ``extra_time`` is to extend both the contestant
75+
time-window (as defined by ``starting_time`` + ``per_user_time``) and
76+
the contest time-window (as defined by ``end_time``) by the value of
77+
``extra_time``, but only for that contestant. Therefore, setting
78+
``extra_time`` to S seconds effectively allows a contestant to use S
79+
seconds more than before (regardless of the time she started the
80+
contest).
81+
82+
Again, delay time is similar, but it shifts both contestant and
83+
contest time-window by that value. The effect on available time
84+
similar to that achieved by setting ``extra_time``, with the
85+
difference explained before in point 1. Also, there is a difference in
86+
token generation as explained in point 2. before.
87+
88+
Finally, changing ``starting_time`` is very similar to changing
89+
``delay_time``, but it shifts just the contestant time-window, hence
90+
if that window was already going over ``end_time``, at all effects
91+
advancing ``starting_time`` would not award more time to the
92+
contestant, because the end would still be capped at ``end_time``. The
93+
effect on token generation is the same.
94+
95+
Again, there is probably no need to fiddle with more than one of these
96+
three parameters, and our suggestion is to just use ``extra_time`` or
97+
``delay_time`` to award more time to a contestant.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Welcome to CMS's documentation!
99
Running CMS
1010
Creating a contest
1111
Configuring a contest
12+
Detailed timing configuration
1213
Task types
1314
Score types
1415
Task versioning

0 commit comments

Comments
 (0)