Skip to content

Commit 99b2094

Browse files
committed
Don't display future clarifications to teams
Only time where this can ever happen is a replay of a contest but change is trivial enough.
1 parent cf2478c commit 99b2094

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

webapp/src/Controller/Team/MiscController.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,14 @@ public function homeAction(Request $request): Response
105105
->setParameter('contest', $contest)
106106
->setParameter('team', $team)
107107
->addOrderBy('c.submittime', 'DESC')
108-
->addOrderBy('c.clarid', 'DESC')
109-
->getQuery()
110-
->getResult();
108+
->addOrderBy('c.clarid', 'DESC');
109+
if (!$this->dj->checkrole('jury')) {
110+
$qb->andWhere('c.submittime <= :time')
111+
->setparameter('time', time());
112+
}
113+
114+
/** @var Clarification[] $clarifications */
115+
$clarifications = $qb->getQuery()->getResult();
111116

112117
/** @var Clarification[] $clarificationRequests */
113118
$clarificationRequests = $this->em->createQueryBuilder()

0 commit comments

Comments
 (0)