From 44a03e88e7125f409eaf3429d2ebfdcff8a6ee52 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 28 Feb 2025 16:25:09 +0000 Subject: [PATCH 01/11] Fix displaying too late submissions when submitting exactly at the end time of a contest --- webapp/templates/team/partials/submission_list.html.twig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/templates/team/partials/submission_list.html.twig b/webapp/templates/team/partials/submission_list.html.twig index 77b96645b1..588afb2457 100644 --- a/webapp/templates/team/partials/submission_list.html.twig +++ b/webapp/templates/team/partials/submission_list.html.twig @@ -51,11 +51,11 @@ - {%- if submission.submittime > submission.contest.endtime %} - {{ 'too-late' | printResult }} + {%- if submission.submittime >= submission.contest.endtime %} + {{ 'too-late' | printResult }} {%- endif %} - {%- if submission.submittime <= submission.contest.endtime or showTooLateResult %} - {%- if submission.submittime > submission.contest.endtime %} + {%- if submission.submittime < submission.contest.endtime or showTooLateResult %} + {%- if submission.submittime >= submission.contest.endtime %} / {% endif %} {%- if submission.judgings.first is empty or submission.judgings.first.result is empty %} From ca678dd5ff389d39e03a158107db70d42bfbe717 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 28 Feb 2025 17:08:53 +0000 Subject: [PATCH 02/11] Show list of submissions on public and team scoreboards when clicking on a cell Fixes #2427 --- webapp/public/style_domjudge.css | 8 +++ webapp/src/Controller/PublicController.php | 65 +++++++++++++++++++ .../Controller/Team/SubmissionController.php | 6 ++ .../SubmissionRestriction.php | 1 + webapp/src/Service/SubmissionService.php | 6 ++ .../partials/scoreboard_table.html.twig | 20 +++++- .../public/partials/submission_list.html.twig | 55 ++++++++++++++++ .../public/team_submissions.html.twig | 13 ++++ .../public/team_submissions_modal.html.twig | 9 +++ 9 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 webapp/templates/public/partials/submission_list.html.twig create mode 100644 webapp/templates/public/team_submissions.html.twig create mode 100644 webapp/templates/public/team_submissions_modal.html.twig diff --git a/webapp/public/style_domjudge.css b/webapp/public/style_domjudge.css index a9c5f89168..dee407d4c3 100644 --- a/webapp/public/style_domjudge.css +++ b/webapp/public/style_domjudge.css @@ -634,6 +634,14 @@ tr.ignore td, td.ignore, span.ignore { min-width: 2em; } +h5 .problem-badge { + font-size: 1rem; +} + +h1 .problem-badge { + font-size: 2rem; +} + .tooltip .tooltip-inner { max-width: 500px; } diff --git a/webapp/src/Controller/PublicController.php b/webapp/src/Controller/PublicController.php index 9d368ad964..73602d5b1a 100644 --- a/webapp/src/Controller/PublicController.php +++ b/webapp/src/Controller/PublicController.php @@ -2,6 +2,7 @@ namespace App\Controller; +use App\DataTransferObject\SubmissionRestriction; use App\Entity\Contest; use App\Entity\ContestProblem; use App\Entity\Team; @@ -11,6 +12,7 @@ use App\Service\EventLogService; use App\Service\ScoreboardService; use App\Service\StatisticsService; +use App\Service\SubmissionService; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NonUniqueResultException; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -33,6 +35,7 @@ public function __construct( protected readonly ConfigurationService $config, protected readonly ScoreboardService $scoreboardService, protected readonly StatisticsService $stats, + protected readonly SubmissionService $submissionService, EntityManagerInterface $em, EventLogService $eventLog, KernelInterface $kernel, @@ -79,6 +82,18 @@ public function scoreboardAction( if ($static) { $data['hide_menu'] = true; + $submissions = $this->submissionService->getSubmissionList( + [$contest->getCid() => $contest], + new SubmissionRestriction(valid: true), + paginated: false + )[0]; + + $submissionsPerTeamAndProblem = []; + foreach ($submissions as $submission) { + $submissionsPerTeamAndProblem[$submission->getTeam()->getTeamid()][$submission->getProblem()->getProbid()][] = $submission; + } + $data['submissionsPerTeamAndProblem'] = $submissionsPerTeamAndProblem; + $data['verificationRequired'] = $this->config->get('verification_required'); } $data['current_contest'] = $contest; @@ -267,4 +282,54 @@ protected function getBinaryFile(int $probId, callable $response): StreamedRespo return $response($probId, $contest, $contestProblem); } + + #[Route(path: '/submissions/team/{teamId<\d+>}/problem/{problemId<\d+>}', name: 'public_submissions')] + public function submissionsAction(Request $request, int $teamId, int $problemId): Response + { + $contest = $this->dj->getCurrentContest(onlyPublic: true); + + if (!$contest) { + throw $this->createNotFoundException('No active contest found'); + } + + /** @var Team|null $team */ + $team = $this->em->getRepository(Team::class)->find($teamId); + if ($team && $team->getCategory() && !$team->getCategory()->getVisible()) { + $team = null; + } + + if (!$team) { + throw $this->createNotFoundException('Team not found'); + } + + /** @var ContestProblem|null $problem */ + $problem = $this->em->getRepository(ContestProblem::class)->find([ + 'problem' => $problemId, + 'contest' => $contest, + ]); + + if (!$problem) { + throw $this->createNotFoundException('Problem not found'); + } + + $submissions = $this->submissionService->getSubmissionList( + [$contest->getCid() => $contest], + new SubmissionRestriction(teamId: $teamId, problemId: $problemId, valid: true), + paginated: false + )[0]; + + $data = [ + 'contest' => $contest, + 'problem' => $problem, + 'team' => $team, + 'submissions' => $submissions, + 'verificationRequired' => $this->config->get('verification_required'), + ]; + + if ($request->isXmlHttpRequest()) { + return $this->render('public/team_submissions_modal.html.twig', $data); + } + + return $this->render('public/team_submissions.html.twig', $data); + } } diff --git a/webapp/src/Controller/Team/SubmissionController.php b/webapp/src/Controller/Team/SubmissionController.php index c26cffb046..49f63ab858 100644 --- a/webapp/src/Controller/Team/SubmissionController.php +++ b/webapp/src/Controller/Team/SubmissionController.php @@ -248,4 +248,10 @@ public function downloadAction(int $submitId): Response return $this->submissionService->getSubmissionZipResponse($submission); } + + #[Route(path: '/submissions/team/{teamId<\d+>}/problem/{problemId<\d+>}', name: 'team_submissions')] + public function listAction(int $probId): Response + { + + } } diff --git a/webapp/src/DataTransferObject/SubmissionRestriction.php b/webapp/src/DataTransferObject/SubmissionRestriction.php index b62057d68a..c23f86bf4f 100644 --- a/webapp/src/DataTransferObject/SubmissionRestriction.php +++ b/webapp/src/DataTransferObject/SubmissionRestriction.php @@ -69,5 +69,6 @@ public function __construct( public ?bool $externallyJudged = null, public ?bool $externallyVerified = null, public ?bool $withExternalId = null, + public ?bool $valid = null, ) {} } diff --git a/webapp/src/Service/SubmissionService.php b/webapp/src/Service/SubmissionService.php index 52d95befa0..96a4452b52 100644 --- a/webapp/src/Service/SubmissionService.php +++ b/webapp/src/Service/SubmissionService.php @@ -305,6 +305,12 @@ public function getSubmissionList( ->setParameter('results', $restrictions->results); } + if (isset($restrictions->valid)) { + $queryBuilder + ->andWhere('s.valid = :valid') + ->setParameter('valid', $restrictions->valid); + } + if ($this->dj->shadowMode()) { // When we are shadow, also load the external results $queryBuilder diff --git a/webapp/templates/partials/scoreboard_table.html.twig b/webapp/templates/partials/scoreboard_table.html.twig index e3eaad7b22..78152c81e5 100644 --- a/webapp/templates/partials/scoreboard_table.html.twig +++ b/webapp/templates/partials/scoreboard_table.html.twig @@ -286,15 +286,21 @@ {% endif %} {% endif %} - {% set link = null %} + {% set extra = null %} {% if jury %} {% set restrict = {problemId: problem.probid} %} {% set link = path('jury_team', {teamId: score.team.teamid, restrict: restrict}) %} + {% elseif static %} + {% set link = '#' %} + {% set extra = 'data-bs-toggle="modal" data-bs-target="#team-submissions-modal-' ~ score.team.teamid ~ '-' ~ problem.probid ~ '"' %} + {% else %} + {% set link = path('public_submissions', {teamId: score.team.teamid, problemId: problem.probid}) %} + {% set extra = 'data-ajax-modal' %} {% endif %} {% if numSubmissions != '0' %} - +
{% if matrixItem.isCorrect %}{{ time }}{% else %} {% endif %} @@ -503,6 +509,16 @@ {% include 'partials/team.html.twig' with {size: 6, team: score.team} %} {% endblock %} {% endembed %} + {% for problem in problems %} + {% embed 'partials/modal.html.twig' with {'modalId': 'team-submissions-modal-' ~ score.team.teamid ~ '-' ~ problem.probid} %} + {% block title %} + Submissions for team {{ score.team.effectiveName }} and problem {{ problem | problemBadge }} {{ problem.problem.name }} + {% endblock %} + {% block content %} + {% include 'public/partials/submission_list.html.twig' with {size: 6, team: score.team, submissions: submissionsPerTeamAndProblem[score.team.teamid][problem.probid] ?? []} %} + {% endblock %} + {% endembed %} + {% endfor %} {% endfor %} {% endif %} diff --git a/webapp/templates/public/partials/submission_list.html.twig b/webapp/templates/public/partials/submission_list.html.twig new file mode 100644 index 0000000000..5cf0f9df6e --- /dev/null +++ b/webapp/templates/public/partials/submission_list.html.twig @@ -0,0 +1,55 @@ +{# Render a list of submissions for the scoreboard #} +{# @var submission \App\Entity\Submission #} + +{% if submissions is empty %} +
No submissions
+{% else %} + + + + + + + {% if contest.getRuntimeAsScoreTiebreaker() %} + + {% endif %} + + + + {% for submission in submissions %} + + + + + {% if contest.getRuntimeAsScoreTiebreaker() %} + + {% endif %} + + {% endfor %} + +
timelanguageresultruntime
+ {{ submission.submittime | printtime(null, submission.contest) }} + + {{ submission.language.langid }} + + {% if submission.submittime >= submission.contest.endtime %} + {{ 'too-late' | printResult }} + {% elseif submission.contest.freezetime and submission.submittime >= submission.contest.freezetime and not contest.freezeData.showFinal %} + {{ '' | printResult }} + {% else %} + {% if submission.judgings.first is empty or submission.judgings.first.result is empty %} + {{ '' | printResult }} + {% elseif verificationRequired and not submission.judgings.first.verified %} + {{ '' | printResult }} + {% else %} + {{ submission.judgings.first.result | printResult }} + {% endif %} + {% endif %} + + {% if link and submission.getResult() == 'correct' %} + {{ "%0.3f s" | format(submission.judgings.first.getMaxRuntime()) }} + {% else %} + - + {% endif %} +
+{% endif %} diff --git a/webapp/templates/public/team_submissions.html.twig b/webapp/templates/public/team_submissions.html.twig new file mode 100644 index 0000000000..e95fb92b0e --- /dev/null +++ b/webapp/templates/public/team_submissions.html.twig @@ -0,0 +1,13 @@ +{% extends "public/base.html.twig" %} + +{% block title %} + {% if team is not empty %}Submissions for team {{ team.effectiveName }} and problem {{ problem.problem.name }} - {% endif %}{{ parent() }} +{% endblock %} + +{% block content %} +

+ Submissions for team {{ team.effectiveName }} and problem {{ problem | problemBadge }} {{ problem.problem.name }} +

+ + {% include 'public/partials/submission_list.html.twig' %} +{% endblock %} diff --git a/webapp/templates/public/team_submissions_modal.html.twig b/webapp/templates/public/team_submissions_modal.html.twig new file mode 100644 index 0000000000..e475b3f0b2 --- /dev/null +++ b/webapp/templates/public/team_submissions_modal.html.twig @@ -0,0 +1,9 @@ +{% extends "partials/modal.html.twig" %} + +{% block title %} + Submissions for team {{ team.effectiveName }} and problem {{ problem | problemBadge }} {{ problem.problem.name }} +{% endblock %} + +{% block content %} + {% include 'public/partials/submission_list.html.twig' %} +{% endblock %} From dc7afcf23bc7646c793780fdfd11deacdbb87a34 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 28 Feb 2025 17:28:43 +0000 Subject: [PATCH 03/11] Remove unneeded action --- webapp/src/Controller/Team/SubmissionController.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/webapp/src/Controller/Team/SubmissionController.php b/webapp/src/Controller/Team/SubmissionController.php index 49f63ab858..c26cffb046 100644 --- a/webapp/src/Controller/Team/SubmissionController.php +++ b/webapp/src/Controller/Team/SubmissionController.php @@ -248,10 +248,4 @@ public function downloadAction(int $submitId): Response return $this->submissionService->getSubmissionZipResponse($submission); } - - #[Route(path: '/submissions/team/{teamId<\d+>}/problem/{problemId<\d+>}', name: 'team_submissions')] - public function listAction(int $probId): Response - { - - } } From 37c403349bddac41b376ac3e137f2d92fb468f03 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 28 Feb 2025 18:15:13 +0000 Subject: [PATCH 04/11] Update webapp/src/Controller/PublicController.php Co-authored-by: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> --- webapp/src/Controller/PublicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/Controller/PublicController.php b/webapp/src/Controller/PublicController.php index 73602d5b1a..8a9d9c9a40 100644 --- a/webapp/src/Controller/PublicController.php +++ b/webapp/src/Controller/PublicController.php @@ -293,7 +293,7 @@ public function submissionsAction(Request $request, int $teamId, int $problemId) } /** @var Team|null $team */ - $team = $this->em->getRepository(Team::class)->find($teamId); + $team = $this->em->getRepository(Team::class)->find($teamId); if ($team && $team->getCategory() && !$team->getCategory()->getVisible()) { $team = null; } From 2c792f21521d01b561321ec5b5f3a70dfd45d752 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Fri, 28 Feb 2025 18:15:20 +0000 Subject: [PATCH 05/11] Update webapp/src/Controller/PublicController.php Co-authored-by: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> --- webapp/src/Controller/PublicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/Controller/PublicController.php b/webapp/src/Controller/PublicController.php index 8a9d9c9a40..e207dfc5be 100644 --- a/webapp/src/Controller/PublicController.php +++ b/webapp/src/Controller/PublicController.php @@ -299,7 +299,7 @@ public function submissionsAction(Request $request, int $teamId, int $problemId) } if (!$team) { - throw $this->createNotFoundException('Team not found'); + throw $this->createNotFoundException('Team not found.'); } /** @var ContestProblem|null $problem */ From 14242a453ef80b8cacf76884fdb21637390121a6 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Sat, 1 Mar 2025 10:02:52 +0000 Subject: [PATCH 06/11] Update webapp/templates/partials/scoreboard_table.html.twig Co-authored-by: Jaap Eldering --- webapp/templates/partials/scoreboard_table.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/templates/partials/scoreboard_table.html.twig b/webapp/templates/partials/scoreboard_table.html.twig index 78152c81e5..2ee37a4eef 100644 --- a/webapp/templates/partials/scoreboard_table.html.twig +++ b/webapp/templates/partials/scoreboard_table.html.twig @@ -512,7 +512,7 @@ {% for problem in problems %} {% embed 'partials/modal.html.twig' with {'modalId': 'team-submissions-modal-' ~ score.team.teamid ~ '-' ~ problem.probid} %} {% block title %} - Submissions for team {{ score.team.effectiveName }} and problem {{ problem | problemBadge }} {{ problem.problem.name }} + Submissions for team {{ score.team.effectiveName }} on problem {{ problem | problemBadge }} {{ problem.problem.name }} {% endblock %} {% block content %} {% include 'public/partials/submission_list.html.twig' with {size: 6, team: score.team, submissions: submissionsPerTeamAndProblem[score.team.teamid][problem.probid] ?? []} %} From 8c5934db59caaf4204284208050faa4265f34888 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Sat, 1 Mar 2025 10:08:23 +0000 Subject: [PATCH 07/11] Use accepted and rejected instead of full verdict Also drop time tie breaker column. --- webapp/src/Twig/TwigExtension.php | 13 ++++++++++++- .../public/partials/submission_list.html.twig | 14 +------------- webapp/templates/public/team_submissions.html.twig | 4 ++-- .../public/team_submissions_modal.html.twig | 2 +- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/webapp/src/Twig/TwigExtension.php b/webapp/src/Twig/TwigExtension.php index f66a0acff9..56ff39935d 100644 --- a/webapp/src/Twig/TwigExtension.php +++ b/webapp/src/Twig/TwigExtension.php @@ -513,7 +513,12 @@ public function displayTestcaseResults(array $testcases, bool $submissionDone, b return $results; } - public function printResult(?string $result, bool $valid = true, bool $jury = false): string + public function printResult( + ?string $result, + bool $valid = true, + bool $jury = false, + bool $onlyAcceptedAndRejected = false, + ): string { $result = strtolower($result ?? ''); switch ($result) { @@ -536,9 +541,15 @@ public function printResult(?string $result, bool $valid = true, bool $jury = fa break; case 'correct': $style = 'sol_correct'; + if ($onlyAcceptedAndRejected) { + $result = 'accepted'; + } break; default: $style = 'sol_incorrect'; + if ($onlyAcceptedAndRejected) { + $result = 'rejected'; + } } return sprintf('%s', $valid ? $style : 'disabled', $result); diff --git a/webapp/templates/public/partials/submission_list.html.twig b/webapp/templates/public/partials/submission_list.html.twig index 5cf0f9df6e..01492331a9 100644 --- a/webapp/templates/public/partials/submission_list.html.twig +++ b/webapp/templates/public/partials/submission_list.html.twig @@ -10,9 +10,6 @@ time language result - {% if contest.getRuntimeAsScoreTiebreaker() %} - runtime - {% endif %} @@ -35,19 +32,10 @@ {% elseif verificationRequired and not submission.judgings.first.verified %} {{ '' | printResult }} {% else %} - {{ submission.judgings.first.result | printResult }} + {{ submission.judgings.first.result | printResult(true, false, true) }} {% endif %} {% endif %} - {% if contest.getRuntimeAsScoreTiebreaker() %} - - {% if link and submission.getResult() == 'correct' %} - {{ "%0.3f s" | format(submission.judgings.first.getMaxRuntime()) }} - {% else %} - - - {% endif %} - - {% endif %} {% endfor %} diff --git a/webapp/templates/public/team_submissions.html.twig b/webapp/templates/public/team_submissions.html.twig index e95fb92b0e..3728501603 100644 --- a/webapp/templates/public/team_submissions.html.twig +++ b/webapp/templates/public/team_submissions.html.twig @@ -1,12 +1,12 @@ {% extends "public/base.html.twig" %} {% block title %} - {% if team is not empty %}Submissions for team {{ team.effectiveName }} and problem {{ problem.problem.name }} - {% endif %}{{ parent() }} + {% if team is not empty %}Submissions for team {{ team.effectiveName }} on problem {{ problem.problem.name }} - {% endif %}{{ parent() }} {% endblock %} {% block content %}

- Submissions for team {{ team.effectiveName }} and problem {{ problem | problemBadge }} {{ problem.problem.name }} + Submissions for team {{ team.effectiveName }} on problem {{ problem | problemBadge }} {{ problem.problem.name }}

{% include 'public/partials/submission_list.html.twig' %} diff --git a/webapp/templates/public/team_submissions_modal.html.twig b/webapp/templates/public/team_submissions_modal.html.twig index e475b3f0b2..cc3ffc4d85 100644 --- a/webapp/templates/public/team_submissions_modal.html.twig +++ b/webapp/templates/public/team_submissions_modal.html.twig @@ -1,7 +1,7 @@ {% extends "partials/modal.html.twig" %} {% block title %} - Submissions for team {{ team.effectiveName }} and problem {{ problem | problemBadge }} {{ problem.problem.name }} + Submissions for team {{ team.effectiveName }} on problem {{ problem | problemBadge }} {{ problem.problem.name }} {% endblock %} {% block content %} From a4c8b07ef95d073b5defedff47fec310caccb142 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Sat, 1 Mar 2025 16:19:35 +0000 Subject: [PATCH 08/11] Update webapp/src/Controller/PublicController.php Co-authored-by: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> --- webapp/src/Controller/PublicController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/webapp/src/Controller/PublicController.php b/webapp/src/Controller/PublicController.php index e207dfc5be..2f685e93e2 100644 --- a/webapp/src/Controller/PublicController.php +++ b/webapp/src/Controller/PublicController.php @@ -329,7 +329,6 @@ public function submissionsAction(Request $request, int $teamId, int $problemId) if ($request->isXmlHttpRequest()) { return $this->render('public/team_submissions_modal.html.twig', $data); } - return $this->render('public/team_submissions.html.twig', $data); } } From 5962b8025da1cd9ad4a683e3b7ec6088f26c2b92 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Sat, 1 Mar 2025 16:19:42 +0000 Subject: [PATCH 09/11] Update webapp/src/Twig/TwigExtension.php Co-authored-by: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> --- webapp/src/Twig/TwigExtension.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webapp/src/Twig/TwigExtension.php b/webapp/src/Twig/TwigExtension.php index 56ff39935d..9c4fe68fe0 100644 --- a/webapp/src/Twig/TwigExtension.php +++ b/webapp/src/Twig/TwigExtension.php @@ -518,8 +518,7 @@ public function printResult( bool $valid = true, bool $jury = false, bool $onlyAcceptedAndRejected = false, - ): string - { + ): string { $result = strtolower($result ?? ''); switch ($result) { case 'too-late': From e28750f94d2442698f0cc83f8ad3a3d458fa5410 Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Sat, 1 Mar 2025 16:19:54 +0000 Subject: [PATCH 10/11] Update webapp/templates/public/partials/submission_list.html.twig Co-authored-by: MCJ Vasseur <14887731+vmcj@users.noreply.github.com> --- .../public/partials/submission_list.html.twig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/templates/public/partials/submission_list.html.twig b/webapp/templates/public/partials/submission_list.html.twig index 01492331a9..2277359a34 100644 --- a/webapp/templates/public/partials/submission_list.html.twig +++ b/webapp/templates/public/partials/submission_list.html.twig @@ -6,11 +6,11 @@ {% else %} - - - - - + + + + + {% for submission in submissions %} From 35d8904f6dcac0dba3985e89cc263eaeb4490f0f Mon Sep 17 00:00:00 2001 From: Nicky Gerritsen Date: Sun, 2 Mar 2025 10:20:58 +0000 Subject: [PATCH 11/11] Don't use accepted --- webapp/src/Twig/TwigExtension.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webapp/src/Twig/TwigExtension.php b/webapp/src/Twig/TwigExtension.php index 9c4fe68fe0..b76fd87439 100644 --- a/webapp/src/Twig/TwigExtension.php +++ b/webapp/src/Twig/TwigExtension.php @@ -517,7 +517,7 @@ public function printResult( ?string $result, bool $valid = true, bool $jury = false, - bool $onlyAcceptedAndRejected = false, + bool $onlyRejectedForIncorrect = false, ): string { $result = strtolower($result ?? ''); switch ($result) { @@ -540,13 +540,10 @@ public function printResult( break; case 'correct': $style = 'sol_correct'; - if ($onlyAcceptedAndRejected) { - $result = 'accepted'; - } break; default: $style = 'sol_incorrect'; - if ($onlyAcceptedAndRejected) { + if ($onlyRejectedForIncorrect) { $result = 'rejected'; } }
timelanguageresult
timelanguageresult