Skip to content

Commit 0c5494e

Browse files
committed
Fix 404s for wrong problemid (internal vs external)
Also fixed the title of a page where we still did p{{id}, with the move to externalid we now display without the p. So made this consistent.
1 parent ee42774 commit 0c5494e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

webapp/templates/jury/analysis/languages.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<i class="fas fa-file-code fa-fw"></i> {{ language.total }} total submission{% if language.total != 1 %}s{% endif %}
6363
for {{ language.problems_attempted_count }} problem{% if language.problems_attempted_count != 1 %}s{% endif %}:<br/>
6464
{% for problem in problems %}
65-
<a href="{{ path('jury_problem', {'probId': problem.probid}) }}">
65+
<a href="{{ path('jury_problem', {'probId': problem.externalid}) }}">
6666
{{ problem | problemBadge(language.problems_attempted[problem.probid] is not defined) }}
6767
</a>
6868
{% endfor %}

webapp/templates/jury/problem_testcases.html.twig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "jury/base.html.twig" %}
22
{% import "jury/jury_macros.twig" as macros %}
33

4-
{% block title %}Testcases for p{{ problem.externalid }} - {{ parent() }}{% endblock %}
4+
{% block title %}Testcases for {{ problem.externalid }} - {{ parent() }}{% endblock %}
55

66
{% block extrahead %}
77
{{ parent() }}
@@ -73,13 +73,13 @@
7373
{% endif %}
7474
<td rowspan="2" class="testrank">
7575
{% if allowEdit %}
76-
<a href="{{ path('jury_problem_testcase_move', {'probId': problem.probid, 'rank': testcase.rank, 'direction': 'up'}) }}"
76+
<a href="{{ path('jury_problem_testcase_move', {'probId': problem.externalid, 'rank': testcase.rank, 'direction': 'up'}) }}"
7777
title="Move testcase up"><i class="fas fa-arrow-up"></i></a><br>
7878
{% endif %}
7979
{{ testcase.rank }}
8080
{% if allowEdit %}
8181
<br>
82-
<a href="{{ path('jury_problem_testcase_move', {'probId': problem.probid, 'rank': testcase.rank, 'direction': 'down'}) }}"
82+
<a href="{{ path('jury_problem_testcase_move', {'probId': problem.externalid, 'rank': testcase.rank, 'direction': 'down'}) }}"
8383
title="Move testcase down"><i class="fas fa-arrow-down"></i></a>
8484
{% endif %}
8585
</td>
@@ -88,7 +88,7 @@
8888
{% if testcase.sample %}checked{% endif %} />
8989
</td>
9090
<td class="filename">
91-
<a href="{{ path('jury_problem_testcase_fetch', {'probId': problem.probid, 'rank': testcase.rank, 'type': 'input'}) }}">
91+
<a href="{{ path('jury_problem_testcase_fetch', {'probId': problem.externalid, 'rank': testcase.rank, 'type': 'input'}) }}">
9292
{{ testcase.downloadName | split('/') | last }}.{{ extensionMapping.input }}
9393
</a>
9494
</td>
@@ -114,7 +114,7 @@
114114
</tr>
115115
<tr>
116116
<td class="filename">
117-
<a href="{{ path('jury_problem_testcase_fetch', {'probId': problem.probid, 'rank': testcase.rank, 'type': 'output'}) }}">
117+
<a href="{{ path('jury_problem_testcase_fetch', {'probId': problem.externalid, 'rank': testcase.rank, 'type': 'output'}) }}">
118118
{{ testcase.downloadName | split('/') | last }}.{{ extensionMapping.output }}
119119
</a>
120120
</td>
@@ -132,8 +132,8 @@
132132
{% endif %}
133133
<td class="testimage">
134134
{% if row.imageSize > 0 %}
135-
<a href="{{ path('jury_problem_testcase_fetch', {'probId': problem.probid, 'rank': testcase.rank, 'type': 'image'}) }}">
136-
<span class="filename">p{{ problem.probid }}.t{{ testcase.rank }}.{{ testcase.imageType }}</span>
135+
<a href="{{ path('jury_problem_testcase_fetch', {'probId': problem.externalid, 'rank': testcase.rank, 'type': 'image'}) }}">
136+
<span class="filename">{{ problem.externalid }}.t{{ testcase.rank }}.{{ testcase.imageType }}</span>
137137
</a>
138138
{% if allowEdit %}
139139
&nbsp;

0 commit comments

Comments
 (0)