diff --git a/webapp/src/Controller/Jury/ExecutableController.php b/webapp/src/Controller/Jury/ExecutableController.php index e3301f30f5a..df0f1002503 100644 --- a/webapp/src/Controller/Jury/ExecutableController.php +++ b/webapp/src/Controller/Jury/ExecutableController.php @@ -43,8 +43,8 @@ public function __construct( #[Route(path: '', name: 'jury_executables')] public function indexAction(Request $request): Response { - $executables_tables_enabled = []; - $executables_tables_disabled = []; + $executables_tables_used = []; + $executables_tables_unused = []; $data = []; $form = $this->createForm(ExecutableUploadType::class, $data); $form->handleRequest($request); @@ -127,14 +127,14 @@ public function indexAction(Request $request): Response 'link' => $this->generateUrl('jury_executable_download', ['execId' => $e->getExecid()]) ]; - if ($e->checkEnabled($configScripts)) { - $executables_tables_enabled[] = [ + if ($e->checkUsed($configScripts)) { + $executables_tables_used[] = [ 'data' => $execdata, 'actions' => $execactions, 'link' => $this->generateUrl('jury_executable', ['execId' => $e->getExecid()]), ]; } else { - $executables_tables_disabled[] = [ + $executables_tables_unused[] = [ 'data' => $execdata, 'actions' => $execactions, 'link' => $this->generateUrl('jury_executable', ['execId' => $e->getExecid()]), @@ -146,8 +146,8 @@ public function indexAction(Request $request): Response unset($table_fields['type']); return $this->render('jury/executables.html.twig', [ - 'executables_enabled' => $executables_tables_enabled, - 'executables_disabled' => $executables_tables_disabled, + 'executables_used' => $executables_tables_used, + 'executables_unused' => $executables_tables_unused, 'table_fields' => $table_fields, 'form' => $form, ]); diff --git a/webapp/src/Entity/Executable.php b/webapp/src/Entity/Executable.php index be79be69af2..24e80c6cf42 100644 --- a/webapp/src/Entity/Executable.php +++ b/webapp/src/Entity/Executable.php @@ -185,7 +185,7 @@ public function getZipfileContent(string $tempdir): string /** * @param string[] $configScripts */ - public function checkEnabled(array $configScripts): bool + public function checkUsed(array $configScripts): bool { foreach ($configScripts as $config_script) { if ($this->execid === $config_script) { diff --git a/webapp/templates/jury/executables.html.twig b/webapp/templates/jury/executables.html.twig index c2f38a2d021..159492c57de 100644 --- a/webapp/templates/jury/executables.html.twig +++ b/webapp/templates/jury/executables.html.twig @@ -10,11 +10,11 @@ {% block content %} -

Enabled executables

- {{ macros.table(executables_enabled, table_fields, {'ordering': 'false'}) }} +

Used executables

+ {{ macros.table(executables_used, table_fields, {'ordering': 'false'}) }} -

Disabled executables

- {{ macros.table(executables_disabled, table_fields, {'ordering': 'false'}) }} +

Unused executables

+ {{ macros.table(executables_unused, table_fields, {'ordering': 'false'}) }} {% if is_granted('ROLE_ADMIN') %}

diff --git a/webapp/tests/Unit/Controller/Jury/ExecutableControllerTest.php b/webapp/tests/Unit/Controller/Jury/ExecutableControllerTest.php index 8b473dcad8a..5b45c00ef23 100644 --- a/webapp/tests/Unit/Controller/Jury/ExecutableControllerTest.php +++ b/webapp/tests/Unit/Controller/Jury/ExecutableControllerTest.php @@ -17,7 +17,7 @@ class ExecutableControllerTest extends JuryControllerTestCase protected static string $deleteEntityIdentifier = 'description'; protected static string $getIDFunc = 'getExecid'; protected static string $className = Executable::class; - protected static array $DOM_elements = ['h1' => ['Enabled executables', 'Disabled executables']]; + protected static array $DOM_elements = ['h1' => ['Used executables', 'Unused executables']]; protected static string $addForm = 'executable_upload['; protected static array $addEntitiesShown = ['type']; protected static array $addEntities = [];