core&ui: fix contest with more than 26 problems have wrong alphabetic id (#1008)

Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
Bhscerandundefined authored and GitHub committed 2025-07-07 15:31:46 +01:00
1 parent 627ce77d30
commit dc6345c0b3
11 files changed
+30 -18

No files matched your search

@@ -64,7 +64,7 @@
</form>
{% endif %}
{%- if tdoc -%}
{{ String.fromCharCode(65+tdoc.pids.indexOf(pdoc.docId)) }}
{{ utils.getAlphabeticId(tdoc.pids.indexOf(pdoc.docId)) }}
{%- elif pdoc.pid and pdoc.pid.includes('-') -%}
{{ pdoc.pid.split('-').join('#') }}
{%- else -%}
@@ -80,7 +80,7 @@
<a href="{{ url('problem_detail', pid=pid, query={tid:tdoc.docId}) }}"
class="{% if pass %}pass{% elif fail %}fail{% endif %}
{% if pid==pdoc.docId %} active{% endif %}">
<span class="id">{{ String.fromCharCode(65+loop.index0) }}</span>
<span class="id">{{ utils.getAlphabeticId(loop.index0) }}</span>
{% if status %}<span class="icon icon-{% if pass %}check{% else %}close{% endif %}"></span>{% endif %}
</a>
{%- endfor %}