{% set page_name = "training_main" %} {% extends "layout/basic.html" %} {% block content %}

{{ _('All Training Plans') }}

{% if not tdocs.length %} {{ nothing.render('Sorry, there is no training plan.') }} {% else %}
    {% for tdoc in tdocs %}
  1. {{ tdoc.enroll|default(0) }}
    {{ _('Enrolled') }}

    {{ tdoc.title }}

    {{ tdoc['content'] }}

    • {{ _('{0} sections').format(tdoc['dag']|length) }}, {{ _('{0} problems').format(model.training.getPids(tdoc)|length) }}
    • {% if tsdict[tdoc.docId]['enroll'] %} {% if not tsdict[tdoc.docId]['done'] %} {{ _('Completed') }} {{ (100 * tsdict[tdoc.docId]['done_pids']|length / model.training.getPids(tdoc)|length)|round|int }}% {% else %} {{ _('Completed') }} 100% {% endif %} {% elif handler.hasPerm(perm.PERM_LOGGEDIN) %} {{ _('Not Enrolled') }} {% endif %}
  2. {% endfor %}
{{ paginator.render(page, tpcount, add_qs=qs) }} {% endif %}
{% if handler.hasPerm(perm.PERM_LOGGEDIN) %}

{{ _('Enrolled') }}

    {% for tsdoc in tsdict %} {% if tsdoc['enroll'] %}
  1. {{ tdict[tsdoc['tid']]['title'] }}

    {{ _('Complete') }} {{ (100 * tsdoc['done_pids']|length / handler.get_pids(tdict[tsdoc['doc_id']])|length)|round|int }}%
  2. {% endif %} {% endfor %}
{% endif %} {% if handler.hasPerm(perm.PERM_CREATE_TRAINING) %}

{{ _('Create Training Plan') }}

{{ _('You can create your own training plans and share with others.') }}

{% endif %}
{% endblock %}