-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverview.html
More file actions
274 lines (246 loc) · 12.8 KB
/
overview.html
File metadata and controls
274 lines (246 loc) · 12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
{% extends "contest.html" %}
{% set page = "overview" %}
{% block additional_js %}
{% endblock additional_js %}
{% block core %}
<div class="span9">
<div class="page-header">
<h1>{% trans %}Overview{% endtrans %}</h1>
</div>
<h2>{% trans %}General information{% endtrans %}</h2>
<div class="row">
<div class="{% if contest.per_user_time is not none %}span5{% else %}span9{% endif %}">
<p>
{% if phase == -1 %}
{% trans %}The contest hasn't started yet.{% endtrans %}
</p>
<p>
{% trans start_time=(contest.start + participation.delay_time)|format_datetime_smart,
stop_time=(contest.stop + participation.delay_time + participation.extra_time)|format_datetime_smart %}
The contest will start at {{ start_time }} and will end at {{ stop_time }}.
{% endtrans %}
{% elif phase == 0 %}
{% trans %}The contest is currently running.{% endtrans %}
</p>
<p>
{% trans start_time=(contest.start + participation.delay_time)|format_datetime_smart,
stop_time=(contest.stop + participation.delay_time + participation.extra_time)|format_datetime_smart %}
The contest started at {{ start_time }} and will end at {{ stop_time }}.
{% endtrans %}
{% elif phase >= +1 %}
{% trans %}The contest has already ended.{% endtrans %}
</p>
<p>
{% trans start_time=(contest.start + participation.delay_time)|format_datetime_smart,
stop_time=(contest.stop + participation.delay_time + participation.extra_time)|format_datetime_smart %}
The contest started at {{ start_time }} and ended at {{ stop_time }}.
{% endtrans %}
{% endif %}
</p>
{% if contest.analysis_enabled %}
<p>
{% if phase == +1 %}
{% trans %}The analysis mode hasn't started yet.{% endtrans %}
</p>
<p>
{% trans start_time=contest.analysis_start|format_datetime_smart,
stop_time=contest.analysis_stop|format_datetime_smart %}
The analysis mode will start at {{ start_time }} and will end at {{ stop_time }}.
{% endtrans %}
{% elif phase == +2 %}
{% trans %}The analysis mode is currently running.{% endtrans %}
</p>
<p>
{% trans start_time=contest.analysis_start|format_datetime_smart,
stop_time=contest.analysis_stop|format_datetime_smart %}
The analysis mode started at {{ start_time }} and will end at {{ stop_time }}.
{% endtrans %}
{% elif phase == +3 %}
{% trans %}The analysis mode has already ended.{% endtrans %}
</p>
<p>
{% trans start_time=contest.analysis_start|format_datetime_smart,
stop_time=contest.analysis_stop|format_datetime_smart %}
The analysis mode started at {{ start_time }} and ended at {{ stop_time }}.
{% endtrans %}
{% endif %}
</p>
{% endif %}
{% if tokens_contest != TOKEN_MODE_DISABLED and tokens_tasks != TOKEN_MODE_DISABLED %}
{% if tokens_contest == TOKEN_MODE_INFINITE and tokens_tasks == TOKEN_MODE_INFINITE %}
<p>
{% trans %}You have an infinite number of tokens.{% endtrans %}
</p>
<p>
{% trans %}You can see the detailed result of a submission by using a token on it.{% endtrans %}
{%+ trans %}Your score for each task will be the maximum among the tokened submissions and the last
one.{% endtrans %}
</p>
{% elif tokens_contest == TOKEN_MODE_INFINITE %}
<p>
{% trans %}You have a distinct set of tokens for each task.{% endtrans %}
{%+ trans type_pl=_("tokens") %}You can find the rules for the {{ type_pl }} on each task's description
page.{% endtrans %}
</p>
<p>
{% trans %}You can see the detailed result of a submission by using a token on it.{% endtrans %}
{%+ trans %}Your score for each task will be the maximum among the tokened submissions and the last
one.{% endtrans %}
</p>
{% elif tokens_tasks == TOKEN_MODE_INFINITE %}
<p>
{% trans %}You have a set of tokens shared among all tasks.{% endtrans %}
{{ contest|extract_token_params|format_token_rules }}
</p>
<p>
{% trans %}You can see the detailed result of a submission by using a token on it.{% endtrans %}
{%+ trans %}Your score for each task will be the maximum among the tokened submissions and the last
one.{% endtrans %}
</p>
{% else %}
<p>
{% trans %}You have two types of tokens: a set of <em>contest-tokens</em> shared among all tasks and a
distinct set of <em>task-tokens</em> for each task.{% endtrans %}
{{ contest|extract_token_params|format_token_rules(t_type="contest") }}
{% trans type_pl=_("task-tokens") %}You can find the rules for the {{ type_pl }} on each task's
description page.{% endtrans %}
</p>
<p>
{% trans %}You can see the detailed result of a submission by using two tokens on it, one of each
type.{% endtrans %}
{%+ trans %}Your score for each task will be the maximum among the tokened submissions and the last
one.{% endtrans %}
</p>
{% endif %}
{% endif %}
{% if contest.max_submission_number is not none %}
<p>
{% trans submissions=contest.max_submission_number %}You can submit at most {{ submissions }} solutions
during this contest.{% endtrans %}
</p>
{% endif %}
{% if contest.max_user_test_number is not none %}
<p>
{% trans user_tests=contest.max_user_test_number %}You can submit at most {{ user_tests }} user tests
during this contest.{% endtrans %}
</p>
{% endif %}
</div>
{% if contest.per_user_time is not none %}
<div class="span4">
<div class="well per_user_time">
<p>
{# TODO would be very nice to write something like "just for 3 consecutive hours"... #}
{% trans per_user_time=contest.per_user_time|format_timedelta %}Every user is allowed to compete
(i.e. submit solutions) for a uninterrupted time frame of {{ per_user_time }}.{% endtrans %}
</p>
<p>
{% if actual_phase == -2 %}
{% trans %}As soon as the contest starts you can choose to start your time frame.{% endtrans %}
{%+ trans %}Once you start, you can submit solutions until the end of the time frame or until the
end of the contest, whatever comes first.{% endtrans %}
{% elif actual_phase == -1 %}
{% trans %}By clicking on the button below you can start your time frame.{% endtrans %}
{%+ trans %}Once you start, you can submit solutions until the end of the time frame or until the
end of the contest, whatever comes first.{% endtrans %}
{% elif actual_phase == 0 %}
{% trans start_time=participation.starting_time|format_datetime_smart %}You started your time frame
at {{ start_time }}.{% endtrans %}
{%+ trans %}You can submit solutions until the end of the time frame or until the end of the
contest, whatever comes first.{% endtrans %}
{% elif actual_phase == +1 %}
{% trans start_time=participation.starting_time|format_datetime_smart %}You started your time frame
at {{ start_time }} and you already finished it.{% endtrans %}
{%+ trans %}There's nothing you can do now.{% endtrans %}
{% elif actual_phase >= +2 %}
{% if participation.starting_time is none %}
{% trans %}You never started your time frame. Now it's too late.{% endtrans %}
{% else %}
{% trans start_time=participation.starting_time|format_datetime_smart %}You started your time frame
at {{ start_time }} and you already finished it.{% endtrans %}
{% endif %}
{% if actual_phase != +3 %}
{%+ trans %}There's nothing you can do now.{% endtrans %}
{% endif %}
{% endif %}
</p>
{% if actual_phase == -1 %}
<form action="{{ contest_url(" start") }}" method="POST" style="margin: 0">
{{ xsrf_form_html|safe }}
<input type="hidden" name="next" value="{{ contest_url() }}">
<button type="submit" class="btn btn-danger btn-large"
style="width:100%;-moz-box-sizing:border-box;box-sizing:border-box;">{% trans %}Start!{%
endtrans %}</button>
</form>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% if actual_phase == 0 or actual_phase == 3 or participation.unrestricted or (0 <= actual_phase <= 3 and contest.allow_unofficial_submission_before_analysis_mode)%}
<h2>{% trans %}Task overview{% endtrans %}</h2>
<table class="main_task_list table table-bordered table-striped">
<!-- <colgroup>
<col class="task"/>
<col class="time_limit"/>
<col class="memory_limit"/>
<col class="n_inputs"/>
<col class="task_type"/>
<col class="files"/>
</colgroup> -->
<thead>
<tr>
<th>{% trans %}Score{% endtrans %}</th>
<th>{% trans %}Task{% endtrans %}</th>
<th>{% trans %}Name{% endtrans %}</th>
<th>{% trans %}Time limit{% endtrans %}</th>
<th>{% trans %}Memory limit{% endtrans %}</th>
<th>{% trans %}Type{% endtrans %}</th>
<th>{% trans %}Files{% endtrans %}</th>
{% if tokens_contest != TOKEN_MODE_DISABLED and tokens_tasks != TOKEN_MODE_DISABLED %}
<th>{% trans %}Tokens{% endtrans %}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% set extensions =
"[%s]"|format(contest.languages|map("to_language")|map(attribute="source_extension")|unique|join("|")) %}
{% for t_iter in contest.tasks %}
<tr>
<td
class="public_score {% if task_scores[t_iter.id][0] <= 0 %}score_0{% elif task_scores[t_iter.id][0] >= task_scores[t_iter.id][1] %}score_100{% else %}score_0_100{% endif %}">
{{ task_scores[t_iter.id][2] }}</td>
<th>{{ t_iter.name }}</th>
<td>{{ t_iter.title }}</td>
<td>
{% if t_iter.active_dataset.time_limit is not none %}
{{ t_iter.active_dataset.time_limit|format_duration(length="long") }}
{% else %}
{% trans %}N/A{% endtrans %}
{% endif %}
</td>
<td>
{% if t_iter.active_dataset.memory_limit is not none %}
{{ t_iter.active_dataset.memory_limit|format_size }}
{% else %}
{% trans %}N/A{% endtrans %}
{% endif %}
</td>
<td>{{ get_task_type(dataset=t_iter.active_dataset).name }}</td>
<td>{{ t_iter.submission_format|map("replace", ".%l", extensions)|join(" ") }}</td>
{% if tokens_contest != TOKEN_MODE_DISABLED and tokens_tasks != TOKEN_MODE_DISABLED %}
<td>
{% if t_iter.token_mode == TOKEN_MODE_FINITE or t_iter.token_mode == TOKEN_MODE_INFINITE %}
{% trans %}Yes{% endtrans %}
{% else %}
{% trans %}No{% endtrans %}
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
{% endblock core %}