File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,21 @@ public function viewAction(
215
215
->getQuery ()
216
216
->getOneOrNullResult ();
217
217
218
+ $ disabledProblems = [];
219
+ $ disabledLangs = [];
220
+ foreach ($ rejudging ->getJudgings () as $ judging ) {
221
+ $ submission = $ judging ->getSubmission ();
222
+ $ problem = $ submission ->getContestProblem ();
223
+ $ language = $ submission ->getLanguage ();
224
+
225
+ if (!$ problem ->getAllowJudge ()) {
226
+ $ disabledProblems [$ submission ->getProblemId ()] = $ submission ->getProblem ()->getName ();
227
+ }
228
+ if (!$ language ->getAllowJudge ()) {
229
+ $ disabledLangs [$ submission ->getLanguage ()->getLangid ()] = $ submission ->getLanguage ()->getName ();
230
+ }
231
+ }
232
+
218
233
if (!$ rejudging ) {
219
234
throw new NotFoundHttpException (sprintf ('Rejudging with ID %s not found ' , $ rejudgingId ));
220
235
}
@@ -389,6 +404,8 @@ public function viewAction(
389
404
'url ' => $ request ->getRequestUri (),
390
405
'ajax ' => true ,
391
406
],
407
+ 'disabledProbs ' => $ disabledProblems ,
408
+ 'disabledLangs ' => $ disabledLangs ,
392
409
];
393
410
if ($ request ->isXmlHttpRequest ()) {
394
411
$ data ['ajax ' ] = true ;
Original file line number Diff line number Diff line change 105
105
<div class =" alert alert-warning" >Judgings in this rejudging will be applied automatically.</div >
106
106
{% endif %}
107
107
108
+ {% if disabledLangs %}
109
+ <div class =" alert alert-danger" >
110
+ The following languages are currently not allowed to be judged:
111
+ <ul >
112
+ {% for id , name in disabledLangs %}
113
+ <li >{{ name }}</li >
114
+ {% endfor %}
115
+ </ul >
116
+ </div >
117
+ {% endif %}
118
+ {% if disabledProbs %}
119
+ <div class =" alert alert-danger" >
120
+ The following problems are currently not allowed to be judged:
121
+ <ul >
122
+ {% for id , name in disabledProbs %}
123
+ <li >{{ name }}</li >
124
+ {% endfor %}
125
+ </ul >
126
+ </div >
127
+ {% endif %}
128
+
108
129
<div data-rejudging-matrix >
109
130
{% include ' jury/partials/rejudging_matrix.html.twig' %}
110
131
</div >
You can’t perform that action at this time.
0 commit comments