{% 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 htdocs %} {% else %}

{{ _('Homework') }}

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

    {{ tdoc['title'] }}

    • {{ _('Status') }}: {{ _(handler.status_text(tdoc)) }}
    • {{ _('Open Since') }}: {{ datetime_span(tdoc['begin_at']) }}
    • {% if handler.is_homework_extended(tdoc) or handler.is_done(tdoc) %} {{ _('Hard Deadline') }}: {{ datetime_span(tdoc['end_at']) }} {% else %} {{ _('Deadline') }}: {{ datetime_span(tdoc['penalty_since']) }} {% endif %}
    • {% if htsdict[tdoc['doc_id']]['attend'] == 1 %}
    • {{ _('Claimed') }}
    • {% endif %}
  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['doc_id']]['enroll'] %} {% if not tsdict[tdoc['doc_id']]['done'] %} {{ _('Completed') }} {{ (100 * tsdict[tdoc['doc_id']]['done_pids']|length / training.get_pids(tdoc)|length)|round|int }}% {% else %} {{ _('Completed') }} 100% {% endif %} {% elif handler.has_priv(vj4.model.builtin.PRIV_USER_PROFILE) %} {{ _('Not Enrolled') }} {% endif %}
  2. {% endfor %}
{% endwith %}
{% endif %} {% if not ddocs %} {% else %}

{{ _('Discussion') }}

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