Skip to content

Commit 3d611f6

Browse files
committed
Allow an output_display_limit of -1.
This means unlimited and is already supported by code and mentioned in the docs, but was disallowed by the regular expression. While doing so, also move it from 'Judging' to 'Display' options.
1 parent b6d64fc commit 3d611f6

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

etc/db-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,9 @@
111111
type: int
112112
default_value: 50000
113113
public: false
114-
description: Maximum size of error/system output stored in the database (in bytes); use `-1` to disable any limits.
115-
regex: /^[1-9]\d*$/
116-
error_message: A positive number is required.
117-
- name: output_display_limit
118-
type: int
119-
default_value: 2000
120-
public: false
121-
description: Maximum size of run/diff/error/system output shown in the jury interface (in bytes); use `-1` to disable any limits.
122-
regex: /^[1-9]\d*$/
123-
error_message: A positive number is required.
114+
description: Maximum size of error/system output stored in the database (in bytes); use `-1` to disable any limits. See `Display` / `output_display_limit` for how to control the output *shown*.
115+
regex: /^([1-9]\d*|-1)$/
116+
error_message: A positive number or -1 is required.
124117
- name: lazy_eval_results
125118
type: int
126119
default_value: 1
@@ -208,6 +201,13 @@
208201
- category: Display
209202
description: Options related to the DOMjudge user interface.
210203
items:
204+
- name: output_display_limit
205+
type: int
206+
default_value: 2000
207+
public: false
208+
description: Maximum size of run/diff/error/system output shown in the jury interface (in bytes); use `-1` to disable any limits.
209+
regex: /^([1-9]\d*|-1)$/
210+
error_message: A positive number or -1 is required.
211211
- name: show_pending
212212
type: bool
213213
default_value: true

webapp/src/Controller/Jury/SubmissionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public function viewAction(
390390
$runResult['hostname'] = $firstJudgingRun->getJudgeTask()->getJudgehost()->getHostname();
391391
$runResult['judgehostid'] = $firstJudgingRun->getJudgeTask()->getJudgehost()->getJudgehostid();
392392
}
393-
$runResult['is_output_run_truncated'] = preg_match(
393+
$runResult['is_output_run_truncated'] = $outputDisplayLimit >= 0 && preg_match(
394394
'/\[output storage truncated after \d* B\]/',
395395
(string)$runResult['output_run_last_bytes']
396396
);

0 commit comments

Comments
 (0)