diff --git a/webapp/src/Twig/TwigExtension.php b/webapp/src/Twig/TwigExtension.php index 619830eef84..30b5d458c16 100644 --- a/webapp/src/Twig/TwigExtension.php +++ b/webapp/src/Twig/TwigExtension.php @@ -125,7 +125,7 @@ public function getFilters(): array new TwigFilter('tsvField', [$this, 'toTsvField']), new TwigFilter('fileTypeIcon', [$this, 'fileTypeIcon']), new TwigFilter('problemBadge', [$this, 'problemBadge'], ['is_safe' => ['html']]), - new TwigFilter('problemBadgeForProblemAndContest', [$this, 'problemBadgeForProblemAndContest'], ['is_safe' => ['html']]), + new TwigFilter('problemBadgeForProblemAndContest', [$this, 'problemBadgeForContest'], ['is_safe' => ['html']]), new TwigFilter('printMetadata', [$this, 'printMetadata'], ['is_safe' => ['html']]), new TwigFilter('printWarningContent', [$this, 'printWarningContent'], ['is_safe' => ['html']]), new TwigFilter('entityIdBadge', [$this, 'entityIdBadge'], ['is_safe' => ['html']]), @@ -1108,7 +1108,7 @@ public function problemBadge(ContestProblem $problem): string ); } - public function problemBadgeForProblemAndContest(Problem $problem, ?Contest $contest = null): string + public function problemBadgeForContest(Problem $problem, ?Contest $contest = null): string { $contest ??= $this->dj->getCurrentContest(); $contestProblem = $contest?->getContestProblem($problem); diff --git a/webapp/templates/jury/executable.html.twig b/webapp/templates/jury/executable.html.twig index f27d30b811e..01de2206b7f 100644 --- a/webapp/templates/jury/executable.html.twig +++ b/webapp/templates/jury/executable.html.twig @@ -48,14 +48,14 @@ {% if executable.type == 'compare' %} {% for problem in executable.problemsCompare %} - p{{ problem.probid }} {{ problem | problemBadgeForProblemAndContest(current_contest) }} + p{{ problem.probid }} {{ problem | problemBadgeForContest }} {% set used = true %} {% endfor %} {% elseif executable.type == 'run' %} {% for problem in executable.problemsRun %} - p{{ problem.probid }} {{ problem | problemBadgeForProblemAndContest(current_contest) }} + p{{ problem.probid }} {{ problem | problemBadgeForContest }} {% set used = true %} {% endfor %}