Skip to content

Commit

Permalink
Rename problemBadgeForProblemAndContest to problemBadgeForContest
Browse files Browse the repository at this point in the history
(cherry picked from commit eaf95fe)
  • Loading branch information
moesoha authored and cubercsl committed Aug 3, 2024
1 parent fb59a08 commit 8f28862
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions webapp/src/Twig/TwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']]),
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions webapp/templates/jury/executable.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
{% if executable.type == 'compare' %}
{% for problem in executable.problemsCompare %}
<a href="{{ path('jury_problem', {'probId': problem.probid}) }}">
p{{ problem.probid }} {{ problem | problemBadgeForProblemAndContest(current_contest) }}
p{{ problem.probid }} {{ problem | problemBadgeForContest }}
</a>
{% set used = true %}
{% endfor %}
{% elseif executable.type == 'run' %}
{% for problem in executable.problemsRun %}
<a href="{{ path('jury_problem', {'probId': problem.probid}) }}">
p{{ problem.probid }} {{ problem | problemBadgeForProblemAndContest(current_contest) }}
p{{ problem.probid }} {{ problem | problemBadgeForContest }}
</a>
{% set used = true %}
{% endfor %}
Expand Down

0 comments on commit 8f28862

Please sign in to comment.