From a8932acb712f6dd3a63b66b5a1730545a9a96101 Mon Sep 17 00:00:00 2001 From: iziram Date: Fri, 1 Sep 2023 15:24:44 +0200 Subject: [PATCH 01/18] Assiduites : issue 694 + bug fixe saisie journalier (moduleimpl) --- app/scodoc/sco_formsemestre_status.py | 15 ++++++------- app/scodoc/sco_groups_view.py | 16 +++++++------- app/scodoc/sco_moduleimpl_status.py | 18 +++++++-------- app/views/assiduites.py | 7 ++++-- tests/unit/test_assiduites.py | 32 ++++++++++++++------------- 5 files changed, 46 insertions(+), 42 deletions(-) diff --git a/app/scodoc/sco_formsemestre_status.py b/app/scodoc/sco_formsemestre_status.py index 45c8b4e7..61053f74 100755 --- a/app/scodoc/sco_formsemestre_status.py +++ b/app/scodoc/sco_formsemestre_status.py @@ -888,14 +888,13 @@ def _make_listes_sem(formsemestre: FormSemestre, with_absences=True): if n_members == 0: continue # skip empty groups partition_is_empty = False - # XXX TODO-ASSIDUITE - group["url_etat"] = "non disponible" # url_for( - # "absences.EtatAbsencesGr", - # group_ids=group["group_id"], - # debut=formsemestre.date_debut.strftime("%d/%m/%Y"), - # fin=formsemestre.date_fin.strftime("%d/%m/%Y"), - # scodoc_dept=g.scodoc_dept, - # ) + group["url_etat"] = url_for( + "assiduites.visu_assi_group", + scodoc_dept=g.scodoc_dept, + group_ids=group["id"], + date_debut=formsemestre.date_debut.isoformat(), + date_fin=formsemestre.date_fin.isoformat(), + ) if group["group_name"]: group["label"] = "groupe %(group_name)s" % group else: diff --git a/app/scodoc/sco_groups_view.py b/app/scodoc/sco_groups_view.py index 5f12735d..b27098ef 100644 --- a/app/scodoc/sco_groups_view.py +++ b/app/scodoc/sco_groups_view.py @@ -819,9 +819,13 @@ def tab_absences_html(groups_infos, etat=None): H = ['
'] if not groups_infos.members: return "".join(H) + "

Aucun étudiant !

" + + group_ids: str = ",".join(map(str, groups_infos.group_ids)) + formsemestre: FormSemestre = groups_infos.get_formsemestre() + H.extend( [ - "

Absences

", + "

Assiduités

", '", "

Feuilles

", '