{% load i18n %}
{% load devilry_core_tags %}

{% if me.should_include_examiners %}
    <p class="devilry-cradmin-groupitemvalue-examiners">
        <span class="devilry-cradmin-groupitemvalue-examiners-title">
            {% trans "Examiners" %}:
        </span>
        <span class="devilry-cradmin-groupitemvalue-examiners-names">
            {% devilry_multiple_examiners_long_displayname me.get_assignment me.get_examiners me.get_devilryrole %}
        </span>
    </p>
{% endif %}

{#{% if me.group.is_corrected %}#}
{#    <p class="devilry-cradmin-groupitemvalue-grade">#}
{#        <span class="sr-only">{% trans "Grade" context "group grade" %}:</span>#}
{#        {% devilry_grade_full me.get_assignment me.group.published_grading_points me.get_devilryrole %}#}
{#    </p>#}
{#{% else %}#}
{#    <p class="devilry-cradmin-groupitemvalue-status">#}
{#        <span class="devilry-cradmin-groupitemvalue-status-title sr-only">#}
{#            {% trans "Status" context "group status" %}:#}
{#        </span>#}
{#        {% devilry_groupstatus me.group %}#}
{#    </p>#}
{#{% endif %}#}

{% if me.group.is_waiting_for_feedback or me.group.is_waiting_for_deliveries %}
    <p class="devilry-cradmin-groupitemvalue-status">
        <span class="devilry-cradmin-groupitemvalue-status-title sr-only">
            {% trans "Status" context "group status" %}:
        </span>
        {% devilry_groupstatus me.group %}
    </p>
{% elif me.group.is_corrected %}
    <p class="devilry-cradmin-groupitemvalue-grade">
        <span class="sr-only">{% trans "Grade" context "group grade" %}:</span>
        {% devilry_grade_full me.get_assignment me.group.published_grading_points me.get_devilryrole %}
    </p>
{% else %}
    <p class="devilry-cradmin-groupitemvalue-status">
        <span class="devilry-cradmin-groupitemvalue-status-title sr-only">
            {% trans "Status" context "group status" %}:
        </span>
        {% devilry_groupstatus me.group %}
    </p>
{% endif %}

<p class="devilry-cradmin-groupitemvalue-deadline">
    <span class="devilry-cradmin-groupitemvalue-deadline__label">
        {% trans "Deadline" %}:
    </span>
    <span class="devilry-cradmin-groupitemvalue-deadline__datetime">
        {{ me.group.cached_data.last_feedbackset_deadline_datetime|date:"DATETIME_FORMAT" }}
    </span>
    {% if me.group.cached_data.new_attempt_count > 0 %}
        <span class="devilry-cradmin-groupitemvalue-deadline__attemptnumber">
            ({{ me.group.cached_data.prettyformat_current_attempt_number }})
        </span>
    {% endif %}
</p>

<p class="devilry-cradmin-groupitemvalue-comments">
    {% devilry_comment_summary me.group %}
</p>
