-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 1097 - Add a view with a list of students for a course (#1157)
Resolve issue #1097 Add a view of all students enrolled and in queue for a course and each type of groups. The view is available with a "Lista" button on the course page in next to the course name, and each group section. The view is quite similar to the one for a group. It contains a list of enrolled and queued students, a number of enrolled and queued students, the ability to send an email (hidden addresses or not) and to download a csv list. We define that a student is enrolled in a course, if he is enrolled in any group in the course. A student is in a queue for a course, if he is in a queue for any group and is not enrolled in any group.
- Loading branch information
Showing
5 changed files
with
306 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
zapisy/apps/enrollment/courses/templates/courses/course_parts/course_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{% extends "courses/base.html" %} | ||
|
||
{% load course_types %} | ||
|
||
{% block main-subtitle %} | ||
{{ course }} | ||
{% endblock %} | ||
|
||
{% block enrollment_menu_courses %} class="active"{% endblock %} | ||
|
||
{% block bread %} | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'main-page' %}">Strona główna</a> | ||
</li> | ||
|
||
<li class="breadcrumb-item"> | ||
<a href="{% url 'course-list' %}">Zapisy</a> | ||
</li> | ||
|
||
<li class="breadcrumb-item"> | ||
<a href="{% url 'course-list' %}">Przedmioty</a> | ||
</li> | ||
|
||
<li class="breadcrumb-item"> | ||
<a href="{% url 'course-page' course.slug %}"> | ||
{{course.name}} | ||
</a> | ||
</li> | ||
<li class="breadcrumb-item active" aria-current="page"> | ||
lista | ||
</li> | ||
{% endblock %} | ||
|
||
|
||
|
||
{% block content %} | ||
<header class="d-flex justify-content-between align-items-center"> | ||
<div> | ||
<h1>{{ course }}</h1> | ||
{% if class_type %} | ||
<h3 class="d-inline-block">{{ class_type|decode_class_type_plural }}</h3> | ||
{% endif %} | ||
</div> | ||
</header> | ||
|
||
|
||
<hr> | ||
|
||
<div class="table-responsive-sm"> | ||
<h3>Lista osób zapisanych na przedmiot:</h3> | ||
<p> | ||
Liczba zapisanych osób: {{students_in_course|length}} | ||
</p> | ||
|
||
{% if students_in_course %} | ||
{% include "courses/students_list.html" with students=students_in_course %} | ||
|
||
{% if request.user.is_staff or request.user.employee %} | ||
<div class="d-print-none"> | ||
<h5>Wyślij wiadomość do grupy</h5> | ||
<ul> | ||
<li><a href="mailto:{{ mailto_group }}">udostępniając adresy mailowe studentów</a></li> | ||
<li><a href="mailto:{{ mailto_group_bcc }}">ukrywając adresy mailowe studentów</a></li> | ||
</ul> | ||
|
||
<h5>Ściągnij listę studentów z grupy jako:</h5> | ||
<ul> | ||
<li><a href="{% url 'course-csv' course.slug %}">csv</a></li> | ||
</ul> | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
|
||
<div class="table-responsive-sm d-print-none"> | ||
{%if students_in_queue %} | ||
<h3>Lista osób oczekujących na zapis:</h3> | ||
<p>Liczba osób oczekujących na zapis: {{students_in_queue|length}}</p> | ||
|
||
{% include "courses/students_list.html" with students=students_in_queue %} | ||
|
||
{% if request.user.is_staff or request.user.employee %} | ||
<h5>Wyślij wiadomość do kolejki</h5> | ||
<ul> | ||
<li><a href="mailto:{{ mailto_queue }}">udostępniając adresy mailowe studentów</a></li> | ||
<li><a href="mailto:{{ mailto_queue_bcc }}">ukrywając adresy mailowe studentów</a></li> | ||
</ul> | ||
|
||
<h5>Ściągnij listę studentów z kolejki jako:</h5> | ||
<ul> | ||
<li><a href="{% url 'course-queue-csv' course.slug %}">csv</a></li> | ||
</ul> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.