Absences semestre dans table recap

This commit is contained in:
Emmanuel Viennet 2023-02-21 00:59:26 +01:00
parent 76257f1794
commit 5177d46815
2 changed files with 15 additions and 0 deletions

View File

@ -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 {

View File

@ -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],