diff --git a/app/but/jury_but.py b/app/but/jury_but.py
index 3a797ad8..d07618dd 100644
--- a/app/but/jury_but.py
+++ b/app/but/jury_but.py
@@ -689,7 +689,23 @@ class DecisionsProposeesAnnee(DecisionsProposees):
dec_rcue.descr_validation()
for dec_rcue in self.decisions_rcue_by_niveau.values()
]
- return line_sep.join([v for v in validations if v])
+ return line_sep.join(v for v in validations if v)
+
+ def descr_ues_validation(self, line_sep: str = "\n") -> str:
+ """Description textuelle des UE validées (enregistrés)
+ pour PV jurys
+ """
+ validations = []
+ for res in (self.res_impair, self.res_pair):
+ if res:
+ dec_ues = [
+ self.decisions_ues[ue.id]
+ for ue in res.ues
+ if ue.type == UE_STANDARD and ue.id in self.decisions_ues
+ ]
+ valids = [dec_ue.descr_validation() for dec_ue in dec_ues]
+ validations.append(", ".join(v for v in valids if v))
+ return line_sep.join(validations)
class DecisionsProposeesRCUE(DecisionsProposees):
@@ -900,7 +916,7 @@ class DecisionsProposeesUE(DecisionsProposees):
def descr_validation(self) -> str:
"""Description validation niveau enregistrée, pour PV jury.
- Si l'UE est validé, done son acronyme, sinon chaine vide.
+ Si l'UE est validée, donne son acronyme, sinon chaine vide.
"""
if self.code_valide in sco_codes.CODES_UE_VALIDES:
return f"{self.ue.acronyme}"
diff --git a/app/but/jury_but_pv.py b/app/but/jury_but_pv.py
index 13f61cdd..095c5efc 100644
--- a/app/but/jury_but_pv.py
+++ b/app/but/jury_but_pv.py
@@ -44,7 +44,7 @@ def pvjury_table_but(formsemestre_id: int, format="html") -> list[dict]:
"""
formsemestre: FormSemestre = FormSemestre.query.get_or_404(formsemestre_id)
assert formsemestre.formation.is_apc()
- title = "Jury BUT annuel"
+ title = "Procès-verbal de jury BUT annuel"
if format == "html":
line_sep = "
"
@@ -55,6 +55,7 @@ def pvjury_table_but(formsemestre_id: int, format="html") -> list[dict]:
titles = {
"nom": "Nom",
"cursus": "Cursus",
+ "ues": "UE validées",
"niveaux": "Niveaux de compétences validés",
"decision_but": f"Décision BUT{annee_but}",
"diplome": "Résultat au diplôme",
@@ -76,7 +77,15 @@ def pvjury_table_but(formsemestre_id: int, format="html") -> list[dict]:
row = {
"nom": etud.etat_civil_pv(line_sep=line_sep),
"_nom_order": etud.sort_key,
+ "_nom_target_attrs": f'class="etudinfo" id="{etud.id}"',
+ "_nom_td_attrs": f'id="{etud.id}" class="etudinfo"',
+ "_nom_target": url_for(
+ "scolar.ficheEtud",
+ scodoc_dept=g.scodoc_dept,
+ etudid=etud.id,
+ ),
"cursus": _descr_cursus_but(etud),
+ "ues": deca.descr_ues_validation(line_sep=line_sep) if deca else "-",
"niveaux": deca.descr_niveaux_validation(line_sep=line_sep)
if deca
else "-",
@@ -93,21 +102,36 @@ def pvjury_table_but(formsemestre_id: int, format="html") -> list[dict]:
xls_style_base["alignment"] = Alignment(wrapText=True, vertical="top")
tab = GenTable(
- columns_ids=titles.keys(),
- rows=rows,
- titles=titles,
- origin=f"Généré par {scu.sco_version.SCONAME} le {scu.timedate_human_repr()}",
+ base_url=f"{request.base_url}?formsemestre_id={formsemestre_id}",
caption=title,
+ columns_ids=titles.keys(),
html_caption=title,
html_class="pvjury_table_but table_leftalign",
- # html_class_ignore_default=True,
+ html_title=f"""