{% set tdocs = payload[0] %} {% set tsdict = payload[1] %} {% if tdocs.length %}

{{ _('Training') }}

    {%- for tdoc in tdocs -%}
  1. {{ tdoc.attend|default(0) }}
    {{ _('Enrolled') }}

    {{ tdoc.title }}

    {{ tdoc['content'] }}

    • {{ _('{0} sections').format(tdoc['dag']|length) }}, {{ _('{0} problems').format(model.training.getPids(tdoc.dag)|length) }}
    • {% if tsdict[tdoc.docId]['enroll'] %} {% if not tsdict[tdoc.docId]['done'] %} {{ _('Completed') }} {{ (100 * tsdict[tdoc.docId]['donePids']|length / model.training.getPids(tdoc.dag)|length)|round|int }}% {% else %} {{ _('Completed') }} 100% {% endif %} {% elif handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {{ _('Not Enrolled') }} {% endif %}
  2. {%- endfor -%}
{% endif %}