{% set no_path_section = true %} {% extends "layout/basic.html" %} {% import "components/contest.html" as contest with context %} {% block content %} {% if handler.domain['bulletin'] %}
{{ handler.domain['bulletin']|markdown }}
{% endif %}
{% if not tdocs %} {% else %}

{{ _('Contest') }}

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

    {{ tdoc.title }}

  2. {% endfor %}
{% endif %} {% if not trdocs %} {% else %}

{{ _('Training') }}

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

{{ _('Discussion') }}

{% include "partials/discussion_list.html" %}
{% endif %}
{% if handler.hasPerm(perm.PERM_VIEW_DISCUSSION) %} {% include 'discussion_nodes_widget.html' %} {% endif %} {% if domain_id == vj4.model.builtin.DOMAIN_ID_SYSTEM %} {% endif %}
{% endblock %}