5
5
use App \Controller \API \GeneralInfoController as GI ;
6
6
use App \Controller \BaseController ;
7
7
use App \Entity \Contest ;
8
+ use App \Entity \ContestProblem ;
8
9
use App \Entity \Judging ;
9
10
use App \Entity \Language ;
10
11
use App \Entity \Problem ;
@@ -247,18 +248,8 @@ public function judgingVerifierAction(Request $request): Response
247
248
{
248
249
/** @var Submission[] $submissions */
249
250
$ submissions = [];
250
- if ($ contest = $ this ->dj ->getCurrentContest ()) {
251
- $ submissions = $ this ->em ->createQueryBuilder ()
252
- ->from (Submission::class, 's ' )
253
- ->join ('s.judgings ' , 'j ' , Join::WITH , 'j.valid = 1 ' )
254
- ->select ('s ' , 'j ' )
255
- ->andWhere ('s.contest = :contest ' )
256
- ->andWhere ('j.result IS NOT NULL ' )
257
- ->setParameter ('contest ' , $ contest )
258
- ->getQuery ()
259
- ->getResult ();
260
- }
261
-
251
+ /** @var ContestProblem[] $problems */
252
+ $ problems = [];
262
253
$ numChecked = 0 ;
263
254
$ numUnchecked = 0 ;
264
255
@@ -272,6 +263,20 @@ public function judgingVerifierAction(Request $request): Response
272
263
273
264
$ verifyMultiple = (bool )$ request ->get ('verify_multiple ' , false );
274
265
266
+ $ contest = $ this ->dj ->getCurrentContest ();
267
+ if ($ contest ) {
268
+ $ problems = $ contest ->getProblems ();
269
+ $ submissions = $ this ->em ->createQueryBuilder ()
270
+ ->from (Submission::class, 's ' )
271
+ ->join ('s.judgings ' , 'j ' , Join::WITH , 'j.valid = 1 ' )
272
+ ->select ('s ' , 'j ' )
273
+ ->andWhere ('s.contest = :contest ' )
274
+ ->andWhere ('j.result IS NOT NULL ' )
275
+ ->setParameter ('contest ' , $ contest )
276
+ ->getQuery ()
277
+ ->getResult ();
278
+ }
279
+
275
280
foreach ($ submissions as $ submission ) {
276
281
// As we only load the needed judging, this will automatically be the first one
277
282
/** @var Judging $judging */
@@ -329,6 +334,7 @@ public function judgingVerifierAction(Request $request): Response
329
334
'verified ' => $ verified ,
330
335
'nomatch ' => $ nomatch ,
331
336
'earlier ' => $ earlier ,
337
+ 'problems ' => $ problems ,
332
338
'verifyMultiple ' => $ verifyMultiple ,
333
339
]);
334
340
}
0 commit comments