{% set no_path_section = true %} {% set page_name = "domain_main" %} {% extends "layout/basic.html" %} {% import "components/contest.html" as contest with context %} {% block content %} {% if system['bulletin'] %}
{{ system['bulletin']|markdown }}
{% endif %}
{% if tdocs.length %}

{{ _('Contest') }}

    {% for tdoc in tdocs %}
  1. {{ datetime_span(tdoc['beginAt'], false, '%d')|safe }}
    {{ datetime_span(tdoc['beginAt'], false, '%Y-%m')|safe }}

    {{ tdoc.title }}

  2. {% endfor %}
{% endif %} {% if trdocs.length %}

{{ _('Training') }}

{% set tdocs = trdocs %} {% set tsdict = trsdict %}
    {% 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._id]['enroll'] %} {% if not tsdict[tdoc._id]['done'] %} {{ _('Completed') }} {{ (100 * tsdict[tdoc._id]['donePids']|length / model.training.getPids(tdoc)|length)|round|int }}% {% else %} {{ _('Completed') }} 100% {% endif %} {% elif handler.hasPerm(perm.PERM_LOGGEDIN) %} {{ _('Not Enrolled') }} {% endif %}
  2. {% endfor %}
{% endif %} {% if ddocs.length %}

{{ _('Discussion') }}

{% include "partials/discussion_list.html" %}
{% endif %}
{% if handler.hasPerm(perm.PERM_VIEW_DISCUSSION) %} {#{% include 'discussion_nodes_widget.html' %} // TODO(masnn) #} {% endif %}
{% endblock %}