{% import "components/paginator.html" as paginator with context %} {% extends "layout/basic.html" %} {{ set(UiContext, 'tdoc', tdoc) }} {% set type = 'homework' if tdoc.rule == 'homework' else 'contest' %} {% block content %}
{{ _('Export as HTML') }} {{ _('Export as CSV') }} {% if model.contest.isEnded(tdoc) and tdoc.lockAt and handler.user.own(tdoc) and not tdoc.unlocked %}
{% endif %}
{% if model.contest.isLocked(tdoc) %}
{{ _('Scoreboard locked at {0}').format(datetimeSpan(tdoc.lockAt))|safe }}
{% elif model.contest.isEnded(tdoc) and tdoc.lockAt and not tdoc.unlocked %}
{{ _('Please wait until contest host unlock the scoreboard.') }}
{% endif %}
{%- for column in rows[0] -%} {%- endfor -%} {%- for column in rows[0] -%} {%- endfor -%} {% set canViewAll = handler.user.own(tdoc) or model.contest.canShowRecord.call(handler, tdoc) %} {%- for row in rows -%}{% if loop.index0 > 0 %} {%- for column in row -%} {%- endfor -%} {% endif %}{%- endfor -%}
{% if column.type == 'problem' and column.raw %} {{ column.value }}
{{ pdict[column.raw].nAccept }}/{{ pdict[column.raw].nSubmit }}
{% else %} {{ column.value|string|nl2br|safe }} {% endif %}
{% if column.type == 'user' %} {% set canView = canViewAll or handler.user._id == column.raw %} {{ user.render_inline(udict[column.raw], badge=false) }} {% elif column.type == 'record' and column.raw %} {{ column.value|string|nl2br|safe }} {% elif column.type == 'records' %} {%- for record in column.raw -%} {% if loop.index0 %}/{% endif %} {% if record.raw %} {{ record.value|string|nl2br|safe }} {% else %} {{ record.value|string|nl2br|safe }} {% endif %} {%- endfor -%} {% else %} {{ column.value|string|nl2br|safe }} {% endif %}
{% endblock %}