Skip to content

Commit d5b9514

Browse files
committed
Also gather the problems for the page
1 parent 3be5a19 commit d5b9514

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

webapp/src/Controller/Jury/JuryMiscController.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use App\Controller\API\GeneralInfoController as GI;
66
use App\Controller\BaseController;
77
use App\Entity\Contest;
8+
use App\Entity\ContestProblem;
89
use App\Entity\Judging;
910
use App\Entity\Language;
1011
use App\Entity\Problem;
@@ -247,18 +248,8 @@ public function judgingVerifierAction(Request $request): Response
247248
{
248249
/** @var Submission[] $submissions */
249250
$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 = [];
262253
$numChecked = 0;
263254
$numUnchecked = 0;
264255

@@ -272,6 +263,20 @@ public function judgingVerifierAction(Request $request): Response
272263

273264
$verifyMultiple = (bool)$request->get('verify_multiple', false);
274265

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+
275280
foreach ($submissions as $submission) {
276281
// As we only load the needed judging, this will automatically be the first one
277282
/** @var Judging $judging */
@@ -329,6 +334,7 @@ public function judgingVerifierAction(Request $request): Response
329334
'verified' => $verified,
330335
'nomatch' => $nomatch,
331336
'earlier' => $earlier,
337+
'problems' => $problems,
332338
'verifyMultiple' => $verifyMultiple,
333339
]);
334340
}

0 commit comments

Comments
 (0)