{% extends "layout/basic.html" %} {% import "components/problem.html" as problem with context %} {% block content %}
{%- if Object.keys(udict).length -%}
{{ _('Enrollees') }} {{ Object.keys(udict).length }}
{%- else -%}
{%- endif -%}
{{ tdoc['content'] }}
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}

{{ _('Login to join training plan') }}

{% elif not tsdoc.enroll %}

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

{% endif %} {% if missing.length %}

{{ _('Some problems in the training are missing or you do not have permission to view them.') }}

{{ missing|join(', ') }}

{% endif %} {{ tdoc.description|default('')|markdown|safe }}
{% if teacherStats %}

{{ _('Teacher stats') }}

{{ _('{0} students').format(teacherStats.totalStudents) }}
{%- for pid in pids -%} {% if pid in pdict and pdict[pid].docId %} {% set st = teacherStats.perPid[pid] %} {% endif %} {%- endfor -%}
{{ _('Problem') }} {{ _('Students who tried') }} {{ _('Solved (AC)') }} {{ _('AC rate') }}
{{ problem.render_problem_title(pdict[pid], show_tags=false) }} {{ st.tried }} / {{ teacherStats.totalStudents }} {{ st.ac }} / {{ teacherStats.totalStudents }}
{{ st.pct }}%
{% endif %}
{% include "partials/training_detail.html" %}
{% 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(udoc, badge=false) }}
{% endblock %}