From 3dece830702f583c5b51868e98f7959e54fe35e5 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 9 Feb 2023 16:01:56 +0100 Subject: [PATCH] Fix: ordre cols code UE dans table recap --- app/scodoc/sco_recapcomplet.py | 3 ++- app/tables/jury_recap.py | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/scodoc/sco_recapcomplet.py b/app/scodoc/sco_recapcomplet.py index 4c1a634013..602289db49 100644 --- a/app/scodoc/sco_recapcomplet.py +++ b/app/scodoc/sco_recapcomplet.py @@ -108,7 +108,8 @@ def formsemestre_recapcomplet( return data H = [ html_sco_header.sco_header( - page_title=f"{formsemestre.sem_modalite()}: moyennes", + page_title=f"{formsemestre.sem_modalite()}: " + + ("jury" if mode_jury else "moyennes"), no_side_bar=True, init_qtip=True, javascripts=["js/etud_info.js", "js/table_recap.js"], diff --git a/app/tables/jury_recap.py b/app/tables/jury_recap.py index 67dceebf41..db8497d3ce 100644 --- a/app/tables/jury_recap.py +++ b/app/tables/jury_recap.py @@ -182,24 +182,24 @@ class RowJury(RowRecap): # table recap standard (mais avec group différent) super().add_ue_cols(ue, ue_status, col_group=col_group or "col_ue") dues = self.table.res.get_etud_decision_ues(self.etud.id) - if not dues: - return - due = dues.get(ue.id) - if not due: - return + due = dues.get(ue.id) if dues else None + col_id = f"moy_ue_{ue.id}_code" + title = ( + f"""{ue.acronyme} enregistrée le {due['event_date']}, { + (due["ects"] or 0):.3g} ECTS.""" + if due + else """pas de décision""" + ) self.add_cell( col_id, "", # titre vide - due["code"], - raw_content=due["code"], + due["code"] if due else "", + raw_content=due["code"] if due else "", group="col_ue", classes=["recorded_code"], column_classes={"col_jury", "col_ue_code"}, - target_attrs={ - "title": f"""enregistrée le {due['event_date']}, { - (due["ects"] or 0):.3g} ECTS.""" - }, + target_attrs={"title": title}, ) def add_rcue_cols(self, dec_rcue: DecisionsProposeesRCUE):