From 4db178ea52cb96626a2b7d620d8e49a68775e855 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 9 Dec 2023 15:53:45 +0100 Subject: [PATCH] Assiduite: tableau etat_abs_date --- app/models/etudiants.py | 4 +- app/scodoc/sco_evaluations.py | 14 +- app/scodoc/sco_groups.py | 3 +- app/scodoc/sco_groups_view.py | 2 +- app/scodoc/sco_moduleimpl_status.py | 2 +- app/static/css/scodoc.css | 13 +- app/tables/list_etuds.py | 25 +++- app/tables/liste_assiduites.py | 2 +- .../assiduites/pages/etat_abs_date.j2 | 57 ++++---- .../assiduites/pages/liste_assiduites.j2 | 4 +- .../assiduites/widgets/minitimeline.j2 | 4 +- app/views/assiduites.py | 125 ++++++++++-------- 12 files changed, 146 insertions(+), 109 deletions(-) diff --git a/app/models/etudiants.py b/app/models/etudiants.py index 614833100..4340b85ba 100644 --- a/app/models/etudiants.py +++ b/app/models/etudiants.py @@ -171,7 +171,7 @@ class Identite(db.Model, models.ScoDocModel): def html_link_fiche(self) -> str: "lien vers la fiche" - return f"""{self.nomprenom}""" + return f"""{self.nomprenom}""" def url_fiche(self) -> str: "url de la fiche étudiant" @@ -319,6 +319,8 @@ class Identite(db.Model, models.ScoDocModel): @cached_property def sort_key(self) -> tuple: "clé pour tris par ordre alphabétique" + # Note: scodoc7 utilisait sco_etud.etud_sort_key, à mettre à jour + # si on modifie cette méthode. return ( scu.sanitize_string( self.nom_usuel or self.nom or "", remove_spaces=False diff --git a/app/scodoc/sco_evaluations.py b/app/scodoc/sco_evaluations.py index e05d64f71..0e35c688f 100644 --- a/app/scodoc/sco_evaluations.py +++ b/app/scodoc/sco_evaluations.py @@ -334,9 +334,9 @@ def do_evaluation_list_in_sem(formsemestre_id, with_etat=True): """ req = """SELECT E.id AS evaluation_id, E.* - FROM notes_evaluation E, notes_moduleimpl MI - WHERE MI.formsemestre_id = %(formsemestre_id)s - and MI.id = E.moduleimpl_id + FROM notes_evaluation E, notes_moduleimpl MI + WHERE MI.formsemestre_id = %(formsemestre_id)s + and MI.id = E.moduleimpl_id ORDER BY MI.id, numero desc, date_debut desc """ cnx = ndb.GetDBConnexion() @@ -494,7 +494,7 @@ def formsemestre_evaluations_cal(formsemestre_id):