{% import "components/problem.html" as problem with context %} {% import "components/ui/v1.html" as ui_v1 %}
{% if block.title|default('')|trim %}

{{ block.title }}

{% endif %}
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}{% endif %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}{% endif %} {% for pid in block.pids %} {% set pdoc = pdict[pid] %} {% set psdoc = psdict[pid] %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% endif %} {% endfor %}
{{ _('Status') }}{{ _('Problem') }} {{ _('Tried') }} {{ _('AC') }} {{ _('Difficulty') }}
{% if pdoc %} {% set statusCode = model.builtin.STATUS_CODES[psdoc.status] if psdoc else '' %} {% set statusTone = 'success' if statusCode == 'pass' else ('danger' if statusCode == 'fail' else ('info' if statusCode in ['pending', 'progress'] else 'neutral')) %} {% set statusText = model.builtin.STATUS_TEXTS[psdoc.status] if psdoc else '' %} {% set statusLabel = _(statusText or 'Not attempted') %} {% if psdoc.rid %} {{ ui_v1.badge(statusLabel, statusTone) }} {% else %} {{ ui_v1.badge(statusLabel, statusTone) }} {% endif %} {% endif %} {% if pdoc %} {{ problem.render_problem_title(pdoc, show_tags=false) }} {% else %} {{ problem.render_problem_title({_id: pid, docId: pid, hidden: true, title: '*'}, show_tags=false, invalid=true) }} {% endif %} {{ pdoc.nSubmit if pdoc else '*' }} {{ pdoc.nAccept if pdoc else '*' }} {{ pdoc.difficulty or lib.difficulty(pdoc.nSubmit, pdoc.nAccept) or _('(None)') if pdoc else '*' }}