Skip to content
Snippets Groups Projects
Commit 34e22655 authored by permcu's avatar permcu
Browse files

Adapt the coursebook-template's absences to the new datamodel

parent 2fc91bab
No related branches found
No related tags found
1 merge request!422Resolve "Add export functionality to course book"
...@@ -53,34 +53,19 @@ ...@@ -53,34 +53,19 @@
<td class="lesson-homework">{{ doc.homework }}</td> <td class="lesson-homework">{{ doc.homework }}</td>
<td class="lesson-notes"> <td class="lesson-notes">
{{ documentation.group_note }} {{ documentation.group_note }}
{% for note in notes %} {% for participation in doc.notable_participations %}
{% if note.absent %} {% if participation.absence_reason %}
<span class="lesson-note-absent"> <span class="lesson-note-absent">
{{ note.person.last_name }}, {{ note.person.first_name|slice:"0:1" }}. {{ participation.person.short_name }}
{% if note.excused %} <span class="lesson-note-excused">
<span class="lesson-note-excused"> ({{ participation.absence_reason.short_name }})
{% if note.excuse_type %} </span>
({{ note.excuse_type.short_name }})
{% else %}
({% trans 'e' %})
{% endif %}
</span>
{% endif %}
</span> </span>
{% endif %} {% endif %}
{% if note.tardiness %} {% if participation.tardiness %}
<span class="lesson-note-late"> <span class="lesson-note-late">
{{ note.person.last_name }}, {{ note.person.first_name|slice:"0:1" }}. {{ participation.person.short_name }}
({{ note.tardiness }}′) ({{ participation.tardiness }}′)
{% if note.excused %}
<span class="lesson-note-excused">
{% if note.excuse_type %}
({{ note.excuse_type.short_name }})
{% else %}
({% trans 'e' %})
{% endif %}
</span>
{% endif %}
</span> </span>
{% endif %} {% endif %}
{% for extra_mark in note.extra_marks.all %} {% for extra_mark in note.extra_marks.all %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment