{% import "components/record.html" as record with context %} {% import "components/problem.html" as problem with context %} {% set expanded = 0 %}
{% if handler.request.query.uid and handler.request.query.uid != handler.user._id %}

{{ _('page.training_detail.see_other_user_detail').format(udict[handler.request.query.uid].uname) }}

{% endif %} {%- for node in tdoc['dag'] -%}

{{ _('Section') }} {{ node['_id'] }}. {{ node['title'].split('\n')[0] }}

{% if node['title'].split('\n')[1] %}

{{ node['title'].split('\n')[1] }}

{% endif %}

{% if nsdict[node['_id']]['isDone'] %} {{ _('Completed') }} {% elif nsdict[node['_id']]['isProgress'] %} {{ _('In Progress') }} {% elif nsdict[node['_id']]['isOpen'] %} {{ _('Open') }} {% else %} {{ _('Invalid') }} {% endif %}

{% if nsdict[node['_id']]['isInvalid'] %}

{{ _('This section cannot be challenged at present, so please complete the following sections first') }}:

    {%- for nid in node['requireNids'] -%}
  • {{ _('Section') }} {{ _(nid) }}. {{ ndict[nid]['title'] }} ({{ _('Completed') }} {{ nsdict[nid]['progress'] }}%)
  • {%- endfor -%}
{% endif %} {% if node['content'] %}
{{ node['content']|markdown|safe }}
{% endif %}
{% set should_compare = (handler.request.query.uid or handler.user._id) != handler.user._id and tsdoc["enroll"] %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% if should_compare %} {% else %} {% endif %} {% endif %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% if should_compare %} {% else %} {% endif %} {% endif %} {%- for pid in node['pids'] -%} {% if pid in pdict %} {% set pdoc=pdict[pid] %} {% set psdoc=psdict[pid] %} {% set self_psdoc=selfPsdict[pid] %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% if psdoc['rid'] %} {{ record.render_status_td(psdoc, rid_key='rid', short=should_compare) }} {% else %} {% endif %} {% if should_compare %} {% if self_psdoc['rid'] %} {{ record.render_status_td(self_psdoc, rid_key='rid', short=true) }} {% else %} {% endif %} {% endif %} {% endif %} {% else %} {% set pdoc = {'_id': pid, 'hidden': true, 'title': '*'} %} {% endif %} {%- endfor -%}
{{ _('Status') }} {{ _('My status') }}{{ _('Status') }}{{ _('Problem') }} {{ _('Tried') }} {{ _('AC') }} {{ _('Difficulty') }}
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
{% endif %} {{ problem.render_problem_title( pdoc, invalid=not tsdoc['enroll'], show_tags=false ) }}
{{ pdoc.nSubmit }} {{ pdoc.nAccept }} {{ pdoc['difficulty'] or lib.difficulty(pdoc.nSubmit, pdoc.nAccept) or _('(None)') }}
{{ problem.render_problem_title(pdoc, invalid=true) }} * * *
{%- endfor -%}