Skip to content

Commit

Permalink
Add check for disabled langs/probs to config checker.
Browse files Browse the repository at this point in the history
  • Loading branch information
meisterT committed Apr 20, 2024
1 parent 88cc210 commit a1b0bee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions webapp/src/Service/CheckConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,16 @@ public function checkProblemsValidate(): ConfigCheckItem
}
}
}

foreach ($problem->getContestProblems() as $contestProblem) {
if (!$contestProblem->getAllowJudge()) {
$result = 'E';
$moreproblemerrors[$probid] .= sprintf(
"p%s is disabled in contest '%s'\n",
$probid, $contestProblem->getContest()->getName()
);
}
}
}

$desc = '';
Expand Down Expand Up @@ -638,6 +648,11 @@ public function checkLanguagesValidate(): ConfigCheckItem
$morelanguageerrors[$langid] .= sprintf("Compile script %s exists but is of wrong type (%s instead of compile) for %s\n", $compile, $exec->getType(), $langid);
}
}

if ($language->getAllowSubmit() && !$language->getAllowJudge()) {
$result = 'E';
$morelanguageerrors[$langid] .= sprintf("Language '%s' is allowed to be submit, but not judged.\n", $langid);
}
}

$desc = '';
Expand Down

0 comments on commit a1b0bee

Please sign in to comment.