Prevent double counting of absences #211
Labels
No labels
Security
TeX
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
breaking
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aleksis/AlekSIS-App-Alsijil#211
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If a student is absent from a lesson to which two teachers are assigned, he or she will be counted as having missed two lessons. This case of team-teaching should be excluded from the summation of absences.
created branch
211-prevent-double-counting-of-absencesto address this issuementioned in merge request !663
assigned to @yuha
This issue does not exist in the way it is described - absences are correctly counted when there are multiple teachers assigned to one lesson, since the amount of personal notes (linked to lessons independent of their amount of teachers) with the absent attribute set to true is evaluated. Could you @fph please elaborate on some cases where this issue occurs?
@yuha I thought we just agreed that there is an issue – it's just not formulated very exactly in this issue.
DISTINCTon weekday and period when counting (not only absences, but all counting for personal notes)You can't specify fields to check only when filtering distinct objects using Count(). See https://docs.djangoproject.com/en/4.0/ref/models/querysets/#count-1
But you can use a Subquery instead:
Problem: You can't query with properties like you can do with normal model fields - and therefore, using .distinct with the respective period will be at least unpleasant.
assigned to @nik and unassigned @yuha
@hansegucker Neither @yuha nor me can find any location where the proposed subquery could be applied in the code (there is not a single mention of
school_term_qin Alsijil, andgroups_qis only mentioned in another context).Please get together and fix this issue.
assigned to @hansegucker and unassigned @nik
Wortprotokoll:
Also der Punkt ist es kann Kurse geben also die sind exakt parallel also Stunde ist gleich TRag ist gleich und ähm in beiden Kursen sind die gleichen Schüler drin. ALso ein Schüler ist quasi in zwei Unterrichten gleichzeitig. Zum Beispiel bei einer Englisch-Intensivierungsstunde. So, wenn jetzt beide Lehrer ankreuzen, ass die Person abwesend ist, hat die Person zwei Stunden, in der sie abwesend war, obwohl sie nur in einer Stunde abwesend war. Daraus hat Herr Poetzsch-Heffter dieses Issue gemacht.
This seems not to be an issue in one of our stable deployments right now, so this is postponed until we refurbish the data model and implement attendance lists ("Anwesenheitskontrolle").
unassigned @hansegucker