Skip to content
Snippets Groups Projects
Commit 270ccd17 authored by permcu's avatar permcu
Browse files

Print only absences with class_register as absence_reason_tags

parent 351b377f
No related branches found
No related tags found
1 merge request!422Resolve "Add export functionality to course book"
...@@ -39,6 +39,7 @@ def generate_full_register_printout( ...@@ -39,6 +39,7 @@ def generate_full_register_printout(
"participations", "participations",
to_attr="notable_participations", to_attr="notable_participations",
queryset=ParticipationStatus.objects queryset=ParticipationStatus.objects
.filter(absence_reason__tags__short_name="class_register")
.exclude( .exclude(
Q(absence_reason__isnull=True) Q(absence_reason__isnull=True)
| Q(tardiness__isnull=True) | Q(tardiness__isnull=True)
...@@ -70,9 +71,8 @@ def generate_full_register_printout( ...@@ -70,9 +71,8 @@ def generate_full_register_printout(
group = group.select_related("school_term") group = group.select_related("school_term")
if include_abbreviations or include_members_table: if include_abbreviations or include_members_table:
# TODO: AbsenceReasonTag important? context["absence_reasons"] = AbsenceReason.objects.filter(tags__short_name="class_register", count_as_absent=True)
context["absence_reasons"] = AbsenceReason.objects.filter(count_as_absent=True) context["absence_reasons_not_counted"] = AbsenceReason.objects.filter(tags__short_name="class_register", count_as_absent=False)
context["absence_reasons_not_counted"] = AbsenceReason.objects.filter(count_as_absent=False)
context["extra_marks"] = ExtraMark.objects.all() context["extra_marks"] = ExtraMark.objects.all()
if include_members_table or include_person_overviews: if include_members_table or include_person_overviews:
......
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