File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,16 @@ public function indexAction(
118
118
/** @var Submission[] $submissions */
119
119
[$ submissions , $ submissionCounts ] =
120
120
$ this ->submissionService ->getSubmissionList ($ contests , $ restrictions , $ limit );
121
+ $ disabledProblems = [];
122
+ $ disabledLangs = [];
123
+ foreach ($ submissions as $ submission ) {
124
+ if (!$ submission ->getContestProblem ()->getAllowJudge ()) {
125
+ $ disabledProblems [$ submission ->getProblemId ()] = $ submission ->getProblem ()->getName ();
126
+ }
127
+ if (!$ submission ->getLanguage ()->getAllowJudge ()) {
128
+ $ disabledLangs [$ submission ->getLanguage ()->getLangid ()] = $ submission ->getLanguage ()->getName ();
129
+ }
130
+ }
121
131
122
132
// Load preselected filters
123
133
$ filters = $ this ->dj ->jsonDecode ((string )$ this ->dj ->getCookie ('domjudge_submissionsfilter ' ) ?: '[] ' );
@@ -138,6 +148,8 @@ public function indexAction(
138
148
'showExternalResult ' => $ this ->config ->get ('data_source ' ) ==
139
149
DOMJudgeService::DATA_SOURCE_CONFIGURATION_AND_LIVE_EXTERNAL ,
140
150
'showTestcases ' => count ($ submissions ) <= $ latestCount ,
151
+ 'disabledProbs ' => $ disabledProblems ,
152
+ 'disabledLangs ' => $ disabledLangs ,
141
153
];
142
154
143
155
// For ajax requests, only return the submission list partial.
Original file line number Diff line number Diff line change 37
37
</div >
38
38
</div >
39
39
40
+ {% if disabledLangs %}
41
+ <div class =" alert alert-danger" >
42
+ The following languages are currently not allowed to be judged:
43
+ <ul >
44
+ {% for id , name in disabledLangs %}
45
+ <li >{{ name }}</li >
46
+ {% endfor %}
47
+ </ul >
48
+ </div >
49
+ {% endif %}
50
+ {% if disabledProbs %}
51
+ <div class =" alert alert-danger" >
52
+ The following problems are currently not allowed to be judged:
53
+ <ul >
54
+ {% for id , name in disabledProbs %}
55
+ <li >{{ name }}</li >
56
+ {% endfor %}
57
+ </ul >
58
+ </div >
59
+ {% endif %}
60
+
40
61
<div data-ajax-refresh-target data-ajax-refresh-after =" process_submissions_filter" >
41
62
{%- include ' jury/partials/submission_list.html.twig' %}
42
63
</div >
You can’t perform that action at this time.
0 commit comments