Merge pull request 'Actualiser app/scodoc/sco_edt_cal.py' (#1002) from pascal.bouron/ScoDoc:master into master

Reviewed-on: ScoDoc/ScoDoc#1002
This commit is contained in:
Emmanuel Viennet 2024-10-24 10:35:27 +02:00
commit 3c5cb3e517

View File

@ -222,18 +222,22 @@ def translate_calendar(
if group and group_ids_set and group.id not in group_ids_set: if group and group_ids_set and group.id not in group_ids_set:
continue # ignore cet évènement continue # ignore cet évènement
modimpl: ModuleImpl | bool = event["modimpl"] modimpl: ModuleImpl | bool = event["modimpl"]
params = {
"scodoc_dept": g.scodoc_dept,
"group_ids": group.id,
"heure_deb": event["heure_deb"].replace("h", ":") if "h" in event["heure_deb"] else event["heure_deb"],
"heure_fin": event["heure_fin"].replace("h", ":") if "h" in event["heure_fin"] else event["heure_fin"],
"day": event["jour"]
}
if modimpl:
params["moduleimpl_id"] = modimpl.id
elif group:
params["formsemestre_id"] = group.partition.formsemestre_id
url_abs = ( url_abs = (
url_for( url_for("assiduites.signal_assiduites_group", **params)
"assiduites.signal_assiduites_group", if group
scodoc_dept=g.scodoc_dept, else None
group_ids=group.id,
heure_deb=event["heure_deb"],
heure_fin=event["heure_fin"],
moduleimpl_id=modimpl.id,
day=event["jour"],
)
if modimpl and group
else None
) )
match modimpl: match modimpl:
case False: # EDT non configuré case False: # EDT non configuré