Skip to content

Commit 2f7d453

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 f65e40d commit 2f7d453

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webapp/src/Controller/Team/MiscController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,16 @@ public function homeAction(Request $request): Response
101101
->andWhere('c.contest = :contest')
102102
->andWhere('c.sender IS NULL')
103103
->andWhere('c.recipient = :team OR c.recipient IS NULL')
104+
->andWhere('c.submittime <= :time')
104105
->setParameter('contest', $contest)
105106
->setParameter('team', $team)
107+
->setparameter('time', time())
106108
->addOrderBy('c.submittime', 'DESC')
107109
->addOrderBy('c.clarid', 'DESC');
108110
if ($contest->getStartTimeObject()->getTimestamp() > time()) {
109111
$qb->andWhere('c.problem IS NULL');
110112
}
113+
111114
/** @var Clarification[] $clarifications */
112115
$clarifications = $qb->getQuery()->getResult();
113116

0 commit comments

Comments
 (0)