diff --git a/app/scodoc/sco_edt_cal.py b/app/scodoc/sco_edt_cal.py index 91e3d6561..be0112042 100644 --- a/app/scodoc/sco_edt_cal.py +++ b/app/scodoc/sco_edt_cal.py @@ -222,18 +222,22 @@ def translate_calendar( if group and group_ids_set and group.id not in group_ids_set: continue # ignore cet évènement 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_for( - "assiduites.signal_assiduites_group", - scodoc_dept=g.scodoc_dept, - 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 + url_for("assiduites.signal_assiduites_group", **params) + if group + else None ) match modimpl: case False: # EDT non configuré