{% extends "learning/course/detail.html" %} {% load i18n learning django_bootstrap_breadcrumbs %} {% block title %}{{ block.super }} − {% trans "Students" %}{% endblock %} {% block breadcrumbs %} {{ block.super }} {% breadcrumb "Students" "learning:course/detail/students" course.slug %} {% endblock %} {% block learning_content %} {# Show a warning if the course is private #} {% if course.access == 'COLLABORATORS_ONLY' or course.access == 'PRIVATE' %} {% endif %} {% get_object_perms object user as course_perms %}
{% if "add_student_course" in course_perms %}
{% csrf_token %}
{% include "learning/_includes/user_search_input_form.html" with form=form %}
{% include "learning/_includes/forms/form_group_block.html" with field=form.registration_locked boolean=True %}
{% endif %}
{% if page_obj.object_list %} {% for registration in page_obj %} {% endfor %}
{% trans "Name" %} {% trans "Since" %} {% trans "Self registration" %} {% trans "Locked" %} {% trans "Delete" %}
{{ registration.student }} {{ registration.created|date:"SHORT_DATE_FORMAT" }} {% if registration.self_registration %} {% else %} {% endif %} {% if "change_student_course" in course_perms %}
{% csrf_token %} {% if registration.registration_locked %} {% else %} {% endif %}
{% else %} {% if registration.registration_locked %} {% else %} {% endif %} {% endif %}
{% if "delete_student_course" in course_perms %} {% include "learning/course/_includes/students/modals/unregister_student_from_course.html" with course=object registration=registration %} {% endif %}
{% include "learning/_includes/paginator_buttons.html" with current_page=page_obj %}

{% blocktrans count counter=number_student %}You have only one student.{% plural %}You have {{ counter }} students.{% endblocktrans %}

{% else %} {% endif %} {% endblock %}