Fix: ordre cols code UE dans table recap

This commit is contained in:
Emmanuel Viennet 2023-02-09 16:01:56 +01:00
parent cd1efba06a
commit 3dece83070
2 changed files with 13 additions and 12 deletions

View File

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

View File

@ -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):