Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
b73e6a93
Commit
b73e6a93
authored
3 years ago
by
Martin Mareš
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into devel
parents
d05333bd
572e5355
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/create-contests
+14
-11
14 additions, 11 deletions
bin/create-contests
mo/web/templates/org_contest.html
+16
-11
16 additions, 11 deletions
mo/web/templates/org_contest.html
with
30 additions
and
22 deletions
bin/create-contests
+
14
−
11
View file @
b73e6a93
...
@@ -48,7 +48,10 @@ else:
...
@@ -48,7 +48,10 @@ else:
assert
regions
,
"
Neexistují žádná místa dané úrovně
"
assert
regions
,
"
Neexistují žádná místa dané úrovně
"
for
r
in
regions
:
for
r
in
regions
:
print
(
f
"
Zakládám
{
round
.
round_code
()
}
pro místo
{
r
.
name
}
"
)
if
sess
.
query
(
db
.
Contest
).
filter_by
(
round
=
round
,
place
=
r
).
first
():
print
(
f
"
{
round
.
round_code
()
}
pro místo
{
r
.
name
}
: již existuje
"
)
else
:
print
(
f
"
{
round
.
round_code
()
}
pro místo
{
r
.
name
}
: zakládám
"
)
if
not
args
.
dry_run
:
if
not
args
.
dry_run
:
c
=
db
.
Contest
(
round
=
round
,
place
=
r
,
state
=
state
)
c
=
db
.
Contest
(
round
=
round
,
place
=
r
,
state
=
state
)
...
...
This diff is collapsed.
Click to expand it.
mo/web/templates/org_contest.html
+
16
−
11
View file @
b73e6a93
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
{% set can_edit_points = not site and rights.can_edit_points() %}
{% set can_edit_points = not site and rights.can_edit_points() %}
{% set can_create_solutions = rights.can_upload_feedback() or rights.can_upload_solutions() %}
{% set can_create_solutions = rights.can_upload_feedback() or rights.can_upload_solutions() %}
{% set can_view_statement = rights.can_view_statement() %}
{% set can_view_statement = rights.can_view_statement() %}
{% set can_view_contestants = rights.have_right(Right.view_contestants) %}
{% set can_view_submits = rights.have_right(Right.view_submits) %}
{% block title %}
{% block title %}
{{ round.round_code() }}: {% if site %}soutěžní místo {{ site.name }}{% else %}{{ contest.place.name }}{% endif %}
{{ round.round_code() }}: {% if site %}soutěžní místo {{ site.name }}{% else %}{{ contest.place.name }}{% endif %}
...
@@ -53,37 +55,39 @@
...
@@ -53,37 +55,39 @@
{% endif %}
{% endif %}
</table>
</table>
{% if can_view_contestants or can_upload or can_manage %}{# Ostatní práva implikují některé z těchto #}
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
{% if can_view_contestants %}
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_generic_list
')
}}'
>
Seznam účastníků
</a>
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_generic_list
')
}}'
>
Seznam účastníků
</a>
{% if state != RoundState.preparing %}
{% endif %}
{% if can_view_submits and state != RoundState.preparing %}
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_contest_solutions
')
}}'
>
Odevzdaná řešení
</a>
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_contest_solutions
')
}}'
>
Odevzdaná řešení
</a>
{% endif %}
{% endif %}
{% if can_manag
e and sit
e %}
{% if
not site and
can_manage %}
<a
class=
"btn btn-default"
href=
"{{ ctx.url_for('org_contest_add_user') }}"
>
Přidat účastníka
</a>
<a
class=
"btn btn-default"
href=
"{{ ctx.url_for('org_contest_add_user') }}"
>
Přidat účastníka
</a>
{% endif %}
{% endif %}
{% if not site %}
{% if not site and can_view_contestants and state in [RoundState.grading, RoundState.closed] %}
{% if state in [RoundState.grading, RoundState.closed] %}
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_score
')
}}'
>
Výsledky
</a>
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_score
')
}}'
>
Výsledky
</a>
{% endif %}
{% endif %}
{% if can_view_contestants %}
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_protocols
')
}}'
>
Protokoly
</a>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_protocols
')
}}'
>
Protokoly
</a>
{% endif %}
{% if can_upload %}
{% if can_upload %}
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_scans
')
}}'
>
Zpracování skenů
</a>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_scans
')
}}'
>
Zpracování skenů
</a>
{% endif %}
{% endif %}
{% if not site and can_manage %}
{% if state != RoundState.closed and round.seq > 1 %}
{% if state != RoundState.closed and round.seq > 1 %}
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_contest_advance
')
}}'
>
Postup z minulého kola
</a>
<a
class=
"btn btn-primary"
href=
'{{ ctx.url_for('
org_contest_advance
')
}}'
>
Postup z minulého kola
</a>
{% endif %}
{% endif %}
{% if can_manage %}
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_import_user
')
}}'
>
Importovat účastníky
</a>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_import_user
')
}}'
>
Importovat účastníky
</a>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_import_org
')
}}'
>
Importovat organizátory
</a>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_import_org
')
}}'
>
Importovat organizátory
</a>
{% endif %}
{% if can_manage and not site %}
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_edit
')
}}'
>
Nastavení
</a>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_edit
')
}}'
>
Nastavení
</a>
{% endif %}
{% endif %}
{% if g.user.is_admin %}
{% if
not site and
g.user.is_admin %}
<a
class=
"btn btn-default"
href=
"{{ log_url('contest', ctx.ct_id) }}"
>
Historie
</a>
<a
class=
"btn btn-default"
href=
"{{ log_url('contest', ctx.ct_id) }}"
>
Historie
</a>
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
{% if not site %}
{% if not site %}
<h3>
Soutěžní místa
</h3>
<h3>
Soutěžní místa
</h3>
...
@@ -116,11 +120,12 @@
...
@@ -116,11 +120,12 @@
<p><i>
Žádní účastníci a žádná soutěžní místa.
</i></p>
<p><i>
Žádní účastníci a žádná soutěžní místa.
</i></p>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
<div
class=
"btn-group"
>
{% if can_manage and not site %}
{% if can_manage and not site %}
<div
class=
"btn-group"
>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_add_user
')
}}'
>
Přidat účastníka
</a>
<a
class=
"btn btn-default"
href=
'{{ ctx.url_for('
org_contest_add_user
')
}}'
>
Přidat účastníka
</a>
{% endif %}
</div>
</div>
{% endif %}
<h3>
Úlohy
</h3>
<h3>
Úlohy
</h3>
{% if tasks %}
{% if tasks %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment