Skip to content

Commit fc16b45

Browse files
committed
Flipping it back only makes sense if we did set it to true
In practice our users would hit this code very often as we use this mode only for analysts instances ourselves.
1 parent 0d7b230 commit fc16b45

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

webapp/src/Service/DOMJudgeService.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,16 +1166,17 @@ public function maybeCreateJudgeTasks(Judging $judging, int $priority = JudgeTas
11661166
if (($problem->getLazyEvalResults() === DOMJudgeService::EVAL_DEFAULT && $this->config->get('lazy_eval_results') === static::EVAL_DEMAND)
11671167
|| $problem->getLazyEvalResults() === DOMJudgeService::EVAL_DEMAND) {
11681168
$evalOnDemand = true;
1169-
}
1170-
// Special case, we're shadow and someone submits on our side in that case
1171-
// we're not super lazy.
1172-
if ($this->config->get('data_source') === DOMJudgeService::DATA_SOURCE_CONFIGURATION_AND_LIVE_EXTERNAL
1173-
&& $submission->getExternalid() === null) {
1169+
1170+
// Special case, we're shadow and someone submits on our side in that case
1171+
// we're not super lazy.
1172+
if ($this->config->get('data_source') === DOMJudgeService::DATA_SOURCE_CONFIGURATION_AND_LIVE_EXTERNAL
1173+
&& $submission->getExternalid() === null) {
1174+
$evalOnDemand = false;
1175+
}
1176+
if ($manualRequest) {
1177+
// When explicitly requested, judge the submission.
11741178
$evalOnDemand = false;
1175-
}
1176-
if ($manualRequest) {
1177-
// When explicitly requested, judge the submission.
1178-
$evalOnDemand = false;
1179+
}
11791180
}
11801181
if (!$problem->getAllowJudge() || !$language->getAllowJudge() || $evalOnDemand) {
11811182
return;

0 commit comments

Comments
 (0)