Skip to content

Commit 984f3ed

Browse files
committed
Add check for disabled langs/probs to config checker.
1 parent 466ee4a commit 984f3ed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

webapp/src/Service/CheckConfigService.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,16 @@ public function checkProblemsValidate(): ConfigCheckItem
585585
}
586586
}
587587
}
588+
589+
foreach ($problem->getContestProblems() as $contestProblem) {
590+
if (!$contestProblem->getAllowJudge()) {
591+
$result = 'E';
592+
$moreproblemerrors[$probid] .= sprintf(
593+
"p%s is disabled in contest '%s'\n",
594+
$probid, $contestProblem->getContest()->getName()
595+
);
596+
}
597+
}
588598
}
589599

590600
$desc = '';
@@ -638,6 +648,11 @@ public function checkLanguagesValidate(): ConfigCheckItem
638648
$morelanguageerrors[$langid] .= sprintf("Compile script %s exists but is of wrong type (%s instead of compile) for %s\n", $compile, $exec->getType(), $langid);
639649
}
640650
}
651+
652+
if ($language->getAllowSubmit() && !$language->getAllowJudge()) {
653+
$result = 'E';
654+
$morelanguageerrors[$langid] .= sprintf("Language '%s' is allowed to be submit, but not judged.\n", $langid);
655+
}
641656
}
642657

643658
$desc = '';

0 commit comments

Comments
 (0)