{% extends "layout/basic.html" %} {{ set(UiContext, 'tdoc', tdoc) }} {{ set(UiContext, 'tsdoc', tsdoc) }} {% set type = 'contest' %} {% set nativeRows = scoreboardRows %} {% set nativePdict = scoreboardPdict %} {% macro renderRecord(cell, canView) %} {% if canView and cell.raw %}{% endif %} {%- set _color = utils.status.getScoreColor(cell.score|default(cell.value)) -%} {{ cell.value|string|nl2br|safe }} {% if canView and cell.raw %}{% endif %} {% endmacro %} {% block content %}
{%- for ext in ['HTML', 'CSV', 'Ghost'] -%} {{ _('Export as {0}').format(ext) }} {%- endfor -%} {% for id, name in availableViews %}{% if not ['html', 'csv', 'default', 'ghost'].includes(id) %} {{ _(name) }} {% endif %}{% endfor %} {% if canEdit and cutoff.done and cutoff.nativeLocked %}
{% endif %} {% if manager and not officialBoard %} {{ _('XCPC 榜设置') }} {{ _('管理员全量预览') }} {% endif %} {% if (manager or (cutoff.done and not cutoff.nativeLocked)) and not officialBoard %} {{ _('XCPC 滚榜') }} {% endif %}
{% if cutoff.frozen %}
{% if cutoff.done and cutoff.nativeLocked %} {{ _('比赛已经结束,成绩表仍处于封榜状态,请等待主办方解榜。') }} {% else %} {{ _('The scoreboard was frozen with {0} minutes remaining at {1} - submissions after that time are not used for the student ranking.').format(cutoff.freezeMinutes, datetimeSpan(cutoff.freezeAt))|safe }} {% endif %}
{% endif %}
{%- for column in nativeRows[0] -%} {%- endfor -%} {%- for column in nativeRows[0] -%} {%- endfor -%} {%- set canViewAll = handler.user.own(tdoc) or model.contest.canShowRecord.call(handler, tdoc) -%} {%- for row in nativeRows -%}{%- if loop.index0 > 0 -%} {%- for column in row -%} {% set header = nativeRows[0][loop.index0] %} {% set colType = 'user' if column.type == 'group_user' else header.type %} {%- endfor -%} {%- endif -%}{%- endfor -%} {% if nativeRows.length <= 1 %} {% endif %}
{%- if column.type == 'problem' and column.raw -%} {{ column.value }}
{{ nativePdict[column.raw].nAccept|default(0) }}/{{ nativePdict[column.raw].nSubmit|default(0) }}
{%- else -%} {{ column.value|string|nl2br|safe }} {%- endif -%}
{%- if column.type == 'rank' -%} {{ '*' if column.value == '0' else column.value|string|nl2br|safe }} {%- elif column.type == 'group_user' -%} {%- elif column.type == 'record' and column.raw -%} {{ renderRecord(column, canViewAll) }} {%- else -%} {{ column.value|string|nl2br|safe }} {%- endif -%}
{{ _('暂无小组数据。请先在设置页选择小组来源或配置名单。') }}
{% endblock %}