forked from ScoDoc/ScoDoc
Assiduites : fix evaluation check abs + partition editor
This commit is contained in:
parent
9105a9a5f0
commit
d2bd88ba32
@ -51,7 +51,7 @@ def evaluation_check_absences(evaluation: Evaluation):
|
||||
EXC et pas justifie
|
||||
Ramene 5 listes d'etudid
|
||||
"""
|
||||
if not evaluation.date_debut:
|
||||
if not evaluation.date_debut or not evaluation.date_fin:
|
||||
return [], [], [], [], [] # evaluation sans date
|
||||
|
||||
etudids = [
|
||||
@ -68,10 +68,8 @@ def evaluation_check_absences(evaluation: Evaluation):
|
||||
assiduites: Query = Assiduite.query.filter(
|
||||
Assiduite.etudid.in_(etudids),
|
||||
Assiduite.etat == scu.EtatAssiduite.ABSENT,
|
||||
or_(
|
||||
and_(Assiduite.date_debut >= deb, Assiduite.date_debut <= fin),
|
||||
and_(Assiduite.date_fin >= deb, Assiduite.date_fin <= fin),
|
||||
),
|
||||
fin >= Assiduite.date_debut,
|
||||
deb <= Assiduite.date_fin,
|
||||
)
|
||||
|
||||
abs_etudids = set(assi.etudid for assi in assiduites)
|
||||
|
@ -933,6 +933,7 @@ def partition_editor(formsemestre_id: int, edit_partition=False):
|
||||
formsemestre=formsemestre,
|
||||
read_only=not formsemestre.can_change_groups(),
|
||||
edit_partition=edit_partition,
|
||||
scu=scu,
|
||||
),
|
||||
html_sco_header.sco_footer(),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user