Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 4 additions and 5 deletions
Showing only changes of commit 9187a12882 - Show all commits

View File

@ -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)

View File

@ -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(),
]