{% import "components/record.html" as record with context %} {% import "components/problem.html" as problem with context %} {% extends "layout/basic.html" %} {% block content %}
{{ tdoc['content'] }}
{{ tdoc.description|default('')|markdown|safe }}
{% if not tsdoc.enroll %}

{{ _('page.training_detail.invalid_when_not_enrolled') }}

{% 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 tsdoc.enroll %}
{% 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 %}
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% endif %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% endif %} {%- for pid in node['pids'] -%} {% if pid in pdict %} {% set pdoc=pdict[pid] %} {% set psdoc=psdict[pid] %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% if psdoc['rid'] %} {{ record.render_status_td(psdoc, rid_key='rid') }} {% else %} {% endif %} {% endif %} {% else %} {% set pdoc = {'_id': pid, 'hidden': true, 'title': '*'} %} {% endif %} {%- endfor -%}
{{ _('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) }} * * *
{% endif %}
{%- endfor -%}
 
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
{{ _('Status') }}
{% if tsdoc['enroll'] %}{{ _('Completed' if tsdoc['done'] else 'In Progress') }}{% else %}{{ _('Not Enrolled') }}{% endif %}
{% endif %} {% if tsdoc['enroll'] %}
{{ _('Progress') }}
{{ _('Completed') }} {{ (100 * tsdoc['donePids']|length / pids|length)|round|int }}%
{% endif %}
{{ _('Enrollees') }}
{{ tdoc.attend|default(0) }}
{{ _('Created By') }}
{{ user.render_inline(owner, badge=false) }}
{% endblock %}