From 294ce1d708ece978a73b864683df7eeb60daa99e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 18 Jan 2023 14:25:40 -0300 Subject: [PATCH] Fix: ordre col. tableau recap (groupe admission) --- app/comp/res_common.py | 2 +- app/scodoc/sco_recapcomplet.py | 3 ++- app/scodoc/sco_utils.py | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/comp/res_common.py b/app/comp/res_common.py index 902d24050..8326b6403 100644 --- a/app/comp/res_common.py +++ b/app/comp/res_common.py @@ -905,7 +905,7 @@ class ResultatsSemestre(ResultatsCache): } first = True for i, cid in enumerate(fields): - titles[f"_{cid}_col_order"] = 10000 + i # tout à droite + titles[f"_{cid}_col_order"] = 100000 + i # tout à droite if first: titles[f"_{cid}_class"] = "admission admission_first" first = False diff --git a/app/scodoc/sco_recapcomplet.py b/app/scodoc/sco_recapcomplet.py index 64ffe13a4..de6299316 100644 --- a/app/scodoc/sco_recapcomplet.py +++ b/app/scodoc/sco_recapcomplet.py @@ -37,6 +37,7 @@ from flask import abort, url_for from app import log from app.but import bulletin_but from app.comp import res_sem +from app.comp.res_common import ResultatsSemestre from app.comp.res_compat import NotesTableCompat from app.models import FormSemestre from app.models.etudiants import Identite @@ -407,7 +408,7 @@ def gen_formsemestre_recapcomplet_html( def _gen_formsemestre_recapcomplet_html( formsemestre: FormSemestre, - res: NotesTableCompat, + res: ResultatsSemestre, include_evaluations=False, mode_jury=False, filename: str = "", diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index 3abc68b64..ae178236a 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -1289,7 +1289,10 @@ def gen_row( tr_id = ( f"""id="row_selected" """ if (row.get("etudid", "") == selected_etudid) else "" ) - return f"""{"".join([gen_cell(key, row, elt, with_col_class=with_col_classes) for key in keys if not key.startswith('_')])}""" + return f"""{ + "".join([gen_cell(key, row, elt, with_col_class=with_col_classes) + for key in keys if not key.startswith('_')]) + }""" # Pour accès depuis les templates jinja