Skip to content

Commit

Permalink
Only set expected results during problem import.
Browse files Browse the repository at this point in the history
Otherwise, if you edit and resubmit or replay submissions (even when
submitting as other teams) it would show up in the judging verifier.
  • Loading branch information
meisterT committed Apr 8, 2024
1 parent 2e16f78 commit 5121d5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/src/Service/SubmissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,9 @@ public function submitSolution(

// First look up any expected results in all submission files to minimize the
// SQL transaction time below.
if ($this->dj->checkrole('jury')) {
// Only do this for problem import submissions, as we do not want this for re-submitted submissions nor
// submissions that come through the API, e.g. when doing a replay of an old contest.
if ($this->dj->checkrole('jury') && $source == 'problem import') {
$results = null;
foreach ($files as $file) {
$fileResult = self::getExpectedResults(file_get_contents($file->getRealPath()),
Expand Down

0 comments on commit 5121d5c

Please sign in to comment.