From 5177d4681541fd9287831086ee22815fb64bf046 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 21 Feb 2023 00:59:26 +0100 Subject: [PATCH] Absences semestre dans table recap --- app/static/css/scodoc.css | 6 ++++++ app/tables/recap.py | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index e45b9fd25..1a88fa544 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -4230,6 +4230,12 @@ table.table_recap th.col_res { border-right: 1px dashed green; border-left: 1px dashed green; } +table.table_recap td.abs, +table.table_recap th.abs { + color:rgb(80, 0, 0); + border-right: 1px dashed green; + border-left: 1px dashed green; +} table.table_recap td.partition, table.table_recap th.partition { diff --git a/app/tables/recap.py b/app/tables/recap.py index 8ae435c94..964adae52 100644 --- a/app/tables/recap.py +++ b/app/tables/recap.py @@ -90,6 +90,7 @@ class TableRecap(tb.Table): ] if not res.formsemestre.block_moyenne_generale: groups.append("col_moy_gen") + groups.append("abs") self.set_groups(groups) for etudid in res.formsemestre.etuds_inscriptions: @@ -98,6 +99,7 @@ class TableRecap(tb.Table): self.add_row(row) row.add_etud_cols() row.add_moyennes_cols(ues_sans_bonus) + row.add_abs() self.add_partitions() self.add_cursus() @@ -603,6 +605,13 @@ class RowRecap(tb.Row): target_attrs={"class": "etudinfo", "id": str(etud.id)}, ) + def add_abs(self): + "Ajoute les colonnes absences" + # Absences (nb d'abs non just. dans ce semestre) + nbabs, nbabsjust = self.table.res.formsemestre.get_abs_count(self.etud.id) + self.add_cell("nbabs", "Abs", nbabs, "abs") + self.add_cell("nbabsjust", "Just.", nbabsjust, "abs") + def add_moyennes_cols( self, ues_sans_bonus: list[UniteEns],