Skip to content
Snippets Groups Projects

Resolve "Add export functionality to course book"

Merged permcu requested to merge 258-add-export-functionality-to-course-book into master
3 files
+ 77
70
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -43,39 +43,23 @@
<table>
<tr>
<th colspan="3">{% trans 'Absences' %}</th>
<td>{{ person.absences_count }}</td>
<td>{{ person.absence_count }}</td>
</tr>
<tr>
<td rowspan="{{ excuse_types.count|add:3 }}" style="width: 16mm;"
class="rotate small-print">{% trans "thereof" %}</td>
<th colspan="2">{% trans 'Excused' %}</th>
<td>{{ person.excused }}</td>
</tr>
<tr>
<td rowspan="{{ excuse_types.count|add:1 }}" style="width: 16mm;"
class="rotate small-print">{% trans "thereof" %}</td>
<th>{% trans "Without excuse type" %}</th>
<td>{{ person.excused_without_excuse_type }}</td>
</tr>
{% for excuse_type in excuse_types %}
{% for for absence_reason in absence_reasons %}
<tr>
<th>{{ excuse_type.name }}</th>
<td>{{ person|get_dict:excuse_type.count_label }}</td>
<th>{{ absence_reason.name }}</th>
<td>{{ person|get_dict:absence_reason.count_label }}</td>
</tr>
{% endfor %}
<tr>
<th colspan="2">{% trans 'Unexcused' %}</th>
<td>{{ person.unexcused }}</td>
</tr>
{% for excuse_type in excuse_types_not_absent %}
{% for for absence_reason in absence_reasons_not_counted %}
<tr>
<th colspan="3">{{ excuse_type.name }}</th>
<td>{{ person|get_dict:excuse_type.count_label }}</td>
<th colspan="3">{{ absence_reason.name }}</th>
<td>{{ person|get_dict:absence_reason.count_label }}</td>
</tr>
{% endfor %}
<tr>
<th colspan="3">{% trans 'Tardiness' %}</th>
<td>{{ person.tardiness }}'/{{ person.tardiness_count }}&times;</td>
<td>{{ person.tardiness_sum }}'/{{ person.tardiness_count }}&times;</td>
</tr>
</table>
</div>
@@ -95,64 +79,57 @@
</div>
</div>
<h5>{% trans 'Relevant personal notes' %}</h5>
<h5>{% trans 'Relevant participation statuses' %}</h5>
<table class="small-print">
<thead>
<tr>
<th>{% trans 'Date' %}</th>
<th>{% trans 'Pe.' %}</th>
<th>{% trans 'Subj.' %}</th>
<th>{% trans 'Te.' %}</th>
<th>{% trans 'Absent' %}</th>
<th>{% trans 'Tard.' %}</th>
</tr>
</thead>
<tbody>
{% for participation in person.participations %}
<tr>
<td>{{ participation.documentation.datetime_start.date }}</td>
<td>
{{ participation.documentation.subject.short_name }}
</td>
<!-- TODO: Should probably use short_names -->
<td>{{ participation.note.documentation.teachers.all|join:', ' }}</td>
<td>{{ participation.absence_reason.short_name }}</td>
<td>{{ participation.tardiness }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h5>{% trans 'Relevant personal notes' %}</h5>
<table class="small-print">
<thead>
<tr>
<th>{% trans 'Date' %}</th>
<th>{% trans 'Subj.' %}</th>
<th>{% trans 'Te.' %}</th>
<th colspan="2">{% trans 'Remarks' %}</th>
</tr>
</thead>
<tbody>
{% for note in person.filtered_notes %}
{% if note.absent or note.tardiness or note.remarks or note.extra_marks.all %}
{% for note in person.new_personal_notes %}
{% if note.note or note.extra_marks.all %}
<tr>
{% if note.date %}
<td>{{ note.date }}</td>
<td>{{ note.register_object.period.period }}</td>
{% else %}
<td colspan="2">
{{ note.register_object.date_start }} {{ note.register_object.period_from.period }}.–{{ note.register_object.date_end }}
{{ note.register_object.period_to.period }}.
</td>
{% endif %}
<td>
{% if note.register_object.label_ != "event" %}
{{ note.register_object.get_subject.short_name }}
{% else %}
{% trans "Event" %}
{% endif %}
</td>
<td>{{ note.register_object.teacher_short_names }}</td>
<td>
{% if note.absent %}
{% trans 'Yes' %}
{% if note.excused %}
{% if note.excuse_type %}
({{ note.excuse_type.short_name }})
{% else %}
({% trans 'e' %})
{% endif %}
{% endif %}
{% endif %}
</td>
<td>
{% if note.tardiness %}
{{ note.tardiness }}'
{% endif %}
</td>
<td>{{ note.documentation.datetime_start.date }}</td>
<td>
{% for extra_mark in note.extra_marks.all %}
{{ extra_mark.short_name }}{% if not forloop.last %},{% endif %}
{% endfor %}
{{ note.documentation.subject.short_name }}
</td>
<td>{{ note.remarks }}</td>
<!-- TODO: Should probably use short_names -->
<td>{{ note.documentation.teachers.all|join:', ' }}</td>
<td>{{ note.extra_mark.short_name }}</td>
<td>{{ note.note }}</td>
</tr>
{% endif %}
{% endfor %}
Loading