Skip to content

Commit f9de23c

Browse files
author
Michael Vasseur
committed
Fix W3C test
1 parent ed5e47c commit f9de23c

File tree

2 files changed

+1
-44
lines changed

2 files changed

+1
-44
lines changed

webapp/src/Controller/Jury/SubmissionController.php

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -613,49 +613,6 @@ public function viewAction(
613613
return $this->render('jury/submission.html.twig', $twigData);
614614
}
615615

616-
/**
617-
* @return JudgeTask[]|null
618-
*/
619-
private function getJudgetasks(string|int|null $jobId, int $max_batchsize, Judgehost $judgehost): ?array
620-
{
621-
if ($jobId === null) {
622-
return null;
623-
}
624-
$queryBuilder = $this->em->createQueryBuilder();
625-
/** @var JudgeTask[] $judgetasks */
626-
$judgetasks = $queryBuilder
627-
->from(JudgeTask::class, 'jt')
628-
->select('jt')
629-
->andWhere('jt.judgehost IS NULL')
630-
->andWhere('jt.valid = 1')
631-
->andWhere('jt.jobid = :jobid')
632-
->andWhere('jt.type = :type')
633-
->addOrderBy('jt.priority')
634-
->addOrderBy('jt.judgetaskid')
635-
->setParameter('type', JudgeTaskType::JUDGING_RUN)
636-
->setParameter('jobid', $jobId)
637-
->setMaxResults($max_batchsize)
638-
->getQuery()
639-
->getResult();
640-
if (empty($judgetasks)) {
641-
// TODO: There is currently a race condition when a jury member requests the remaining test cases to be
642-
// judged in the time between allocating the final batch and the next judgehost checking in and deleting
643-
// the queuetask here.
644-
$this->em->createQueryBuilder()
645-
->from(QueueTask::class, 'qt')
646-
->andWhere('qt.judging = :jobid')
647-
->setParameter('jobid', $jobId)
648-
->delete()
649-
->getQuery()
650-
->execute();
651-
$this->em->flush();
652-
$this->dj->auditlog('queuetask', $jobId, 'deleted');
653-
} else {
654-
return $this->serializeJudgeTasks($judgetasks, $judgehost);
655-
}
656-
return null;
657-
}
658-
659616
#[Route(path: '/request-full-debug/{jid}', name: 'request_full_debug')]
660617
public function requestFullDebug(Request $request, Judging $jid): RedirectResponse
661618
{

webapp/templates/jury/submission.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@
841841
</script>
842842
{% endif %} {# selectedJudging.result != 'compiler-error' #}
843843

844-
{% if visualization is defined %}
844+
{% if visualization is defined and visualization %}
845845
<h5>Team answer visualization</h5>
846846
<img src={{ visualization.url }}>
847847
{% endif %}

0 commit comments

Comments
 (0)