Skip to content

Commit

Permalink
add are you sure popup before rejudging all subs
Browse files Browse the repository at this point in the history
  • Loading branch information
AngusRitossa committed Aug 13, 2024
1 parent 00ce5ed commit 1a1df03
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions cms/server/admin/templates/macro/reevaluation_buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,47 @@
{% elif contest_id is not none %}
{% set invalidate_arguments = {"contest_id": contest_id} %}
{% endif %}
<button onclick="cmsrpc_request(
<button onclick="if (confirm('Are you sure you want to recompile and judge all submissions?')) {
cmsrpc_request(
'EvaluationService', 0,
'invalidate_submission', {
{% for key, value in invalidate_arguments.items() %}
'{{ key }}': {{ value }},
{% endfor %}
'level': 'compilation'},
function(response) { utils.redirect_if_ok('{{ next_page }}', response); }
);"
);
}"
{% if not allowed %}
disabled
{% endif %}
title="Compilation" >C</button>
<button onclick="cmsrpc_request(
<button onclick="if (confirm('Are you sure you want to rejudge all submissions?')) {
cmsrpc_request(
'EvaluationService', 0,
'invalidate_submission', {
{% for key, value in invalidate_arguments.items() %}
'{{ key }}': {{ value }},
{% endfor %}
'level': 'evaluation'},
function(response) { utils.redirect_if_ok('{{ next_page }}', response); }
);"
);
}"
{% if not allowed %}
disabled
{% endif %}
title="Evaluation" >E</button>
<button onclick="cmsrpc_request(
<button onclick="if (confirm('Are you sure you want to rescore all submissions?')) {
cmsrpc_request(
'ScoringService', 0,
'invalidate_submission', {
{% for key, value in invalidate_arguments.items() %}
'{{ key }}': {{ value }},
{% endfor %}
},
function(response) { utils.redirect_if_ok('{{ next_page }}', response); }
);"
);
}"
{% if not allowed %}
disabled
{% endif %}
Expand Down

0 comments on commit 1a1df03

Please sign in to comment.