Skip to content

Commit 827c183

Browse files
moesohacubercsl
authored andcommitted
Rename problemBadgeForProblemAndContest to problemBadgeForContest
(cherry picked from commit eaf95fe)
1 parent f81ec56 commit 827c183

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: webapp/src/Twig/TwigExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function getFilters(): array
125125
new TwigFilter('tsvField', [$this, 'toTsvField']),
126126
new TwigFilter('fileTypeIcon', [$this, 'fileTypeIcon']),
127127
new TwigFilter('problemBadge', [$this, 'problemBadge'], ['is_safe' => ['html']]),
128-
new TwigFilter('problemBadgeForProblemAndContest', [$this, 'problemBadgeForProblemAndContest'], ['is_safe' => ['html']]),
128+
new TwigFilter('problemBadgeForContest', [$this, 'problemBadgeForContest'], ['is_safe' => ['html']]),
129129
new TwigFilter('printMetadata', [$this, 'printMetadata'], ['is_safe' => ['html']]),
130130
new TwigFilter('printWarningContent', [$this, 'printWarningContent'], ['is_safe' => ['html']]),
131131
new TwigFilter('entityIdBadge', [$this, 'entityIdBadge'], ['is_safe' => ['html']]),
@@ -1108,7 +1108,7 @@ public function problemBadge(ContestProblem $problem): string
11081108
);
11091109
}
11101110

1111-
public function problemBadgeForProblemAndContest(Problem $problem, ?Contest $contest = null): string
1111+
public function problemBadgeForContest(Problem $problem, ?Contest $contest = null): string
11121112
{
11131113
$contest ??= $this->dj->getCurrentContest();
11141114
$contestProblem = $contest?->getContestProblem($problem);

Diff for: webapp/templates/jury/executable.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@
4848
{% if executable.type == 'compare' %}
4949
{% for problem in executable.problemsCompare %}
5050
<a href="{{ path('jury_problem', {'probId': problem.probid}) }}">
51-
p{{ problem.probid }} {{ problem | problemBadgeForProblemAndContest(current_contest) }}
51+
p{{ problem.probid }} {{ problem | problemBadgeForContest }}
5252
</a>
5353
{% set used = true %}
5454
{% endfor %}
5555
{% elseif executable.type == 'run' %}
5656
{% for problem in executable.problemsRun %}
5757
<a href="{{ path('jury_problem', {'probId': problem.probid}) }}">
58-
p{{ problem.probid }} {{ problem | problemBadgeForProblemAndContest(current_contest) }}
58+
p{{ problem.probid }} {{ problem | problemBadgeForContest }}
5959
</a>
6060
{% set used = true %}
6161
{% endfor %}

0 commit comments

Comments
 (0)