Skip to content

Commit

Permalink
Mark executables as disabled for languages not allowed to submit
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Sep 21, 2023
1 parent 681a35e commit 2891f6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions webapp/src/Controller/Jury/ExecutableController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ private function checkDisabled(Executable $e): bool
if (count($e->getProblemsCompare()) || count($e->getProblemsRun())) {
return true;
}
foreach ($e->getLanguages() as $lang) {
if ($lang->getAllowSubmit()) {
return true;
}
}
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion webapp/templates/jury/executables.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
<p>
{{ button(path('jury_executable_add'), 'Add new executable', 'primary', 'plus') }}
</p>
{% endif %}
{% endif %} #}

{% endblock %}

0 comments on commit 2891f6c

Please sign in to comment.