mirror of
https://github.com/nelsbrock/NateMan.git
synced 2026-08-14 21:36:49 +02:00
116 lines
4.4 KiB
Django/Jinja
116 lines
4.4 KiB
Django/Jinja
{#
|
||
NateMan – Nachschreibtermin-Manager
|
||
templates/schueler/versaeumnisse.html.j2
|
||
Copyright © 2020 Niklas Elsbrock
|
||
|
||
This program is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation, either version 3 of the License, or
|
||
(at your option) any later version.
|
||
|
||
This program is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
-#}
|
||
|
||
{% extends 'base.html.j2' %}
|
||
|
||
{% block title %}Versäumnisse{% endblock %}
|
||
{% block header %}Versäumnisse{% endblock %}
|
||
|
||
{#
|
||
klausur_dict: Dictinonary mit jeweils eimem Tupel aus zwei Listen aller Klausuren mit nicht nachgeschriebenen bzw.
|
||
nachgeschriebenen versäumten Klausurteilnahmen pro Stufe, auf die der angemeldete Lehrer Zugriff hat
|
||
#}
|
||
|
||
{% block content %}
|
||
|
||
<form method="post">
|
||
{% for stufe, klausur_listen in klausur_dict.items() %}
|
||
<h3>{{ stufe.name }}</h3>
|
||
|
||
{% for klausur_list in klausur_listen %}
|
||
<h4>
|
||
{% set nachgeschrieben = not loop.first %}
|
||
{% if nachgeschrieben %}
|
||
bereits nachgeschrieben:
|
||
{% else %}
|
||
noch nicht nachgeschrieben:
|
||
{% endif %}
|
||
</h4>
|
||
{% if klausur_list|length == 0 %}
|
||
<p>keine</p>
|
||
{% else %}
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th colspan="6" class="first-in-category">Klausur</th>
|
||
<th rowspan="2" class="first-in-category">Schüler/Schülerin</th>
|
||
<th colspan="2" class="first-in-category">Status</th>
|
||
</tr>
|
||
<tr>
|
||
<th class="first-in-category">ID</th>
|
||
<th>Datum</th>
|
||
<th>Kurs</th>
|
||
<th>Lehrkraft</th>
|
||
<th>Länge</th>
|
||
<th>Bemerkung</th>
|
||
<th class="first-in-category">attestiert</th>
|
||
<th>nachgeschrieben</th>
|
||
</tr>
|
||
</thead>
|
||
|
||
<tbody>
|
||
{% for klausur in klausur_list %}
|
||
{% set kt_list = Klausurteilnahme.query
|
||
.filter_by(klausur=klausur, versaeumt=true, nachgeschrieben=nachgeschrieben).all() %}
|
||
{% for kt in kt_list %}
|
||
<tr>
|
||
{% if loop.first %}
|
||
<td rowspan="{{ kt_list|length }}" class="first-in-category">
|
||
<a href="{{ url_for('klausuren.edit', klausur_id=klausur.id) }}">
|
||
{{ klausur.id }}
|
||
</a>
|
||
</td>
|
||
<td rowspan="{{ kt_list|length }}">{{ macros.date(klausur.date) }}</td>
|
||
<td rowspan="{{ kt_list|length }}">{{ klausur.kursname }}</td>
|
||
<td rowspan="{{ kt_list|length }}">{{ klausur.lehrer.kuerzel }}</td>
|
||
<td rowspan="{{ kt_list|length }}">{{ klausur.laenge }}</td>
|
||
{% if kt.klausur.annotation is not none %}
|
||
<td rowspan="{{ kt_list|length }}" class="description">{{ kt.klausur.annotation }}</td>
|
||
{% else %}
|
||
<td rowspan="{{ kt_list|length }}" class="detail">keine</td>
|
||
{% endif %}
|
||
{% endif %}
|
||
|
||
<td class="first-in-category">
|
||
{{ kt.schueler.nachname }}, {{ kt.schueler.vorname }}
|
||
<span class="detail">({{ kt.schueler.id }}{% if kt.schueler.koop %}, Koop{% endif %})</span>
|
||
</td>
|
||
<td class="first-in-category">
|
||
<input type="checkbox" name="a_{{ kt.klausur.id }}:{{ kt.schueler.id }}"
|
||
aria-label="attestiert" {% if kt.attestiert %}checked{% endif %}>
|
||
</td>
|
||
<td>
|
||
<input type="checkbox" name="n_{{ kt.klausur.id }}:{{ kt.schueler.id }}"
|
||
aria-label="nachgeschrieben" {% if kt.nachgeschrieben %}checked{% endif %}>
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
{% endif %}
|
||
{% endfor %}
|
||
<hr>
|
||
{% endfor %}
|
||
|
||
<p><input type="submit" value="Speichern"></p>
|
||
</form>
|
||
|
||
{% endblock %}
|