diff --git a/app/but/jury_but_pv.py b/app/but/jury_but_pv.py
index 8ae09800f..40db4f0ed 100644
--- a/app/but/jury_but_pv.py
+++ b/app/but/jury_but_pv.py
@@ -55,11 +55,11 @@ def pvjury_page_but(formsemestre_id: int, fmt="html"):
else:
line_sep = "\n"
rows, titles = pvjury_table_but(formsemestre, line_sep=line_sep)
-
+ if fmt.startswith("xls"):
+ titles["ects_but"] = "Total ECTS BUT"
# Style excel... passages à la ligne sur \n
xls_style_base = sco_excel.excel_make_style()
xls_style_base["alignment"] = Alignment(wrapText=True, vertical="top")
-
tab = GenTable(
base_url=f"{request.base_url}?formsemestre_id={formsemestre_id}",
caption=title,
@@ -144,11 +144,14 @@ def pvjury_table_but(
except ScoValueError:
deca = None
+ ects_but_valides = but_ects_valides(etud, referentiel_competence_id)
row = {
- "nom": etud.code_ine or etud.code_nip or etud.id
- if anonymous # Mode anonyme: affiche INE ou sinon NIP, ou id
- else etud.etat_civil_pv(
- line_sep=line_sep, with_paragraph=with_paragraph_nom
+ "nom": (
+ etud.code_ine or etud.code_nip or etud.id
+ if anonymous # Mode anonyme: affiche INE ou sinon NIP, ou id
+ else etud.etat_civil_pv(
+ line_sep=line_sep, with_paragraph=with_paragraph_nom
+ )
),
"_nom_order": etud.sort_key,
"_nom_target_attrs": f'class="etudinfo" id="{etud.id}"',
@@ -159,15 +162,19 @@ def pvjury_table_but(
etudid=etud.id,
),
"cursus": _descr_cursus_but(etud),
- "ects": f"""{deca.ects_annee():g}
Tot. {but_ects_valides(etud, referentiel_competence_id ):g}""",
+ "ects": f"""{deca.ects_annee():g}
Tot. {ects_but_valides:g}""",
+ "_ects_xls": deca.ects_annee(),
+ "ects_but": ects_but_valides,
"ues": deca.descr_ues_validation(line_sep=line_sep) if deca else "-",
- "niveaux": deca.descr_niveaux_validation(line_sep=line_sep)
- if deca
- else "-",
+ "niveaux": (
+ deca.descr_niveaux_validation(line_sep=line_sep) if deca else "-"
+ ),
"decision_but": deca.code_valide if deca else "",
- "devenir": ", ".join([f"S{i}" for i in deca.get_autorisations_passage()])
- if deca
- else "",
+ "devenir": (
+ ", ".join([f"S{i}" for i in deca.get_autorisations_passage()])
+ if deca
+ else ""
+ ),
}
if deca.valide_diplome() or not only_diplome:
rows.append(row)
diff --git a/app/scodoc/gen_tables.py b/app/scodoc/gen_tables.py
index 422dc6760..efe7a32d5 100644
--- a/app/scodoc/gen_tables.py
+++ b/app/scodoc/gen_tables.py
@@ -263,16 +263,16 @@ class GenTable:
colspan_count -= 1
# if colspan_count > 0:
# continue # skip cells after a span
- if pdf_mode:
- content = row.get(f"_{cid}_pdf", False) or row.get(cid, "")
- elif xls_mode:
- content = row.get(f"_{cid}_xls", False) or row.get(cid, "")
+ if pdf_mode and f"_{cid}_pdf" in row:
+ content = row[f"_{cid}_pdf"]
+ elif xls_mode and f"_{cid}_xls" in row:
+ content = row[f"_{cid}_xls"]
else:
content = row.get(cid, "")
# Convert None to empty string ""
content = "" if content is None else content
- colspan = row.get("_%s_colspan" % cid, 0)
+ colspan = row.get(f"_{cid}_colspan", 0)
if colspan > 1:
pdf_style_list.append(
(
diff --git a/app/scodoc/sco_trombino.py b/app/scodoc/sco_trombino.py
index 29dc772d8..1ed5081f2 100644
--- a/app/scodoc/sco_trombino.py
+++ b/app/scodoc/sco_trombino.py
@@ -250,7 +250,6 @@ def trombino_copy_photos(group_ids=None, dialog_confirmed=False):
"Copy photos from portal to ScoDoc (overwriting local copy)"
group_ids = [] if group_ids is None else group_ids
groups_infos = sco_groups_view.DisplayedGroupsInfos(group_ids)
- breakpoint()
back_url = "groups_view?%s&curtab=tab-photos" % groups_infos.groups_query_args
portal_url = sco_portal_apogee.get_portal_url()
diff --git a/sco_version.py b/sco_version.py
index 696c6af38..1b44e1a3b 100644
--- a/sco_version.py
+++ b/sco_version.py
@@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
-SCOVERSION = "9.6.956"
+SCOVERSION = "9.6.957"
SCONAME = "ScoDoc"