Skip to content

Commit

Permalink
Fix W3C test
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Vasseur committed Oct 18, 2024
1 parent ed5e47c commit f9de23c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 44 deletions.
43 changes: 0 additions & 43 deletions webapp/src/Controller/Jury/SubmissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,49 +613,6 @@ public function viewAction(
return $this->render('jury/submission.html.twig', $twigData);
}

/**
* @return JudgeTask[]|null
*/
private function getJudgetasks(string|int|null $jobId, int $max_batchsize, Judgehost $judgehost): ?array
{
if ($jobId === null) {
return null;
}
$queryBuilder = $this->em->createQueryBuilder();
/** @var JudgeTask[] $judgetasks */
$judgetasks = $queryBuilder
->from(JudgeTask::class, 'jt')
->select('jt')
->andWhere('jt.judgehost IS NULL')
->andWhere('jt.valid = 1')
->andWhere('jt.jobid = :jobid')
->andWhere('jt.type = :type')
->addOrderBy('jt.priority')
->addOrderBy('jt.judgetaskid')
->setParameter('type', JudgeTaskType::JUDGING_RUN)
->setParameter('jobid', $jobId)
->setMaxResults($max_batchsize)
->getQuery()
->getResult();
if (empty($judgetasks)) {
// TODO: There is currently a race condition when a jury member requests the remaining test cases to be
// judged in the time between allocating the final batch and the next judgehost checking in and deleting
// the queuetask here.
$this->em->createQueryBuilder()
->from(QueueTask::class, 'qt')
->andWhere('qt.judging = :jobid')
->setParameter('jobid', $jobId)
->delete()
->getQuery()
->execute();
$this->em->flush();
$this->dj->auditlog('queuetask', $jobId, 'deleted');
} else {
return $this->serializeJudgeTasks($judgetasks, $judgehost);
}
return null;
}

#[Route(path: '/request-full-debug/{jid}', name: 'request_full_debug')]
public function requestFullDebug(Request $request, Judging $jid): RedirectResponse
{
Expand Down
2 changes: 1 addition & 1 deletion webapp/templates/jury/submission.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@
</script>
{% endif %} {# selectedJudging.result != 'compiler-error' #}

{% if visualization is defined %}
{% if visualization is defined and visualization %}
<h5>Team answer visualization</h5>
<img src={{ visualization.url }}>
{% endif %}
Expand Down

0 comments on commit f9de23c

Please sign in to comment.