Skip to content

Commit

Permalink
Fix marking the team output as truncated.
Browse files Browse the repository at this point in the history
Previously, we didn't handle the case correctly where the uploaded team
output was truncated but the display limit was set to `-1`/untruncated -
which obviously can only show what we have in the DB.
  • Loading branch information
meisterT committed Mar 23, 2024
1 parent a86b7b9 commit 3fe52e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webapp/src/Controller/Jury/SubmissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,10 @@ public function viewAction(
$runResult['hostname'] = $firstJudgingRun->getJudgeTask()->getJudgehost()->getHostname();
$runResult['judgehostid'] = $firstJudgingRun->getJudgeTask()->getJudgehost()->getJudgehostid();
}
$runResult['is_output_run_truncated'] = $outputDisplayLimit >= 0 && preg_match(
$runResult['is_output_run_truncated'] = preg_match(
'/\[output storage truncated after \d* B\]/',
(string)$runResult['output_run_last_bytes']
$outputDisplayLimit >= 0 ?
(string)$runResult['output_run_last_bytes'] : (string)$runResult['output_run']
);
if ($firstJudgingRun) {
$runResult['testcasedir'] = $firstJudgingRun->getTestcaseDir();
Expand Down

0 comments on commit 3fe52e8

Please sign in to comment.