{% extends 'django_cradmin/viewhelpers/listbuilder/base/itemvalue.django.html' %} {% load devilry_group_tags %} {% load devilry_core_tags %} {% load devilry_account_tags %} {% load cradmin_tags %} {% load crispy_forms_tags %} {% load i18n %} {% block content %}

{% trans "Deadline" %}: {{ me.feedbackset.deadline_datetime|date:'DATETIME_FORMAT' }}

{% if not me.feedbackset.is_merge_type %} {% trans "Attempt" %} {{ me.attempt_num }} {% endif %}
{% if me.feedbackset.is_merge_type %} {% trans "Merged" %}
{% elif me.is_graded %} {% devilry_grade_full assignment=me.assignment points=me.feedbackset.grading_points devilryrole=me.devilryrole %} {% else %} {% devilry_groupstatus me.feedbackset.group %} {% endif %}
{% if me.devilry_viewrole == 'examiner' or 'admin' in me.devilry_viewrole and me.feedbackset.group.cached_data.last_feedbackset == me.feedbackset%} {% comment %} Render button choices only if viewrole is examiner or admin and the last feedbackset is the current feedbackset. {% endcomment %}
{% if me.feedbackset.group.cached_data.last_published_feedbackset_is_last_feedbackset %} {% comment %} The last published feedbackset is the last feedbackset. Examiners can: - Edit the grading - Give a new attempt Admins can: - Give a new attempt - Move the deadline {% endcomment %} {% trans "Give new attempt" %} {% if me.devilry_viewrole == 'examiner' %} {% trans "Edit grade" %} {% endif %} {% if 'admin' in me.devilry_viewrole %} {% trans "Move deadline" %} {% endif %} {% elif not me.feedbackset.group.cached_data.last_published_feedbackset_is_last_feedbackset %} {% comment %} The last published feedbackset is not the last feedbackset Admins and examiners can: - Move the deadline {% endcomment %} {% trans "Move deadline" %} {% endif %}
{% endif %} {% endblock content %}