{% extends "layout/basic.html" %} {% import "components/record.html" as record with context %} {% import "components/problem.html" as problem with context %} {% block content %}

{{ _('Homework Introduction') }}

{{ tdoc['content']|markdown|safe }}

{{ _('Problem') }}

{% if pdict %}
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% endif %} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% endif %} {% set isAdmin = handler.user.own(tdoc) or handler.user.hasPerm(perm.PERM_VIEW_HOMEWORK_HIDDEN_SCOREBOARD) %} {% set ntdoc = model.contest.isDone(tdoc) or (tsdoc.attend and not model.contest.isNotStarted(tdoc)) %} {%- for pid in tdoc.pids -%} {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %} {% if psdict[pid] and psdict[pid].rid %} {% set rdoc = rdict[psdict[pid].rid] %} {% if model.contest.canShowSelfRecord.call(handler, tdoc) %} {{ record.render_status_td(rdoc) }} {% else %} {% endif %} {% else %} {% endif %} {% endif %} {%- endfor -%}
{{ _('Status') }} {{ _('Last Submit At') }}{{ _('Problem') }}
{{ _('Submitted') }}{{ datetimeSpan(rdoc._id)|safe }}{{ _('No Submissions') }} - {% if isAdmin and not ntdoc %} {{ problem.render_problem_title(pdict[pid], show_invisible_flag=false, show_tags=false) }} {% else %} {{ problem.render_problem_title(pdict[pid], tdoc=tdoc, show_invisible_flag=false, show_tags=false) }} {% endif %}
{% elif tsdoc.attend %} {{ nothing.render('This homework is not open and you cannot view problems.') }} {% else %} {{ nothing.render('Please claim the assignment to see the problems.') }} {% endif %}
{% include "partials/homework_sidebar.html" %}
{% endblock %}