Skip to content

Commit 201b40b

Browse files
vmcjmeisterT
authored andcommitted
Only show diff between submissions in the same contest
We get this case for jury imports where the same team DOMjudge uploads in multiple contests (dress + finals) and the first "finals" submission would show a diff with the last jury submission of the dress contest. We could also have this if a team is in 2 contests at the same time but although in theory possible this shouldn't happen in practice.
1 parent b30eb1a commit 201b40b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

webapp/src/Controller/Jury/SubmissionController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,12 @@ public function sourceAction(
889889
->andWhere('s.problem = :probid')
890890
->andWhere('s.language = :langid')
891891
->andWhere('s.submittime < :submittime')
892+
->andWhere('s.contest = :contest')
892893
->setParameter('teamid', $submission->getTeam())
893894
->setParameter('probid', $submission->getProblem())
894895
->setParameter('langid', $submission->getLanguage())
895896
->setParameter('submittime', $submission->getSubmittime())
897+
->setParameter('contest', $submission->getContest())
896898
->orderBy('s.submittime', 'DESC')
897899
->setMaxResults(1)
898900
->getQuery()

0 commit comments

Comments
 (0)