From 77b66ba5f230800133a83ef53031e87aeeca03ad Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 18 Oct 2023 15:55:51 +0200 Subject: [PATCH] =?UTF-8?q?PV=20jury:=20param=C3=A8tre=20pour=20changer=20?= =?UTF-8?q?le=20titre=20(session)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_archives.py | 3 +++ app/scodoc/sco_pv_forms.py | 13 ++++++++++++- app/scodoc/sco_pv_pdf.py | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_archives.py b/app/scodoc/sco_archives.py index e296316c..05e75f1f 100644 --- a/app/scodoc/sco_archives.py +++ b/app/scodoc/sco_archives.py @@ -330,6 +330,7 @@ def do_formsemestre_archive( code_vdi=None, show_title=False, pv_title=None, + pv_title_session=None, with_paragraph_nom=False, anonymous=False, bul_version="long", @@ -453,6 +454,7 @@ def do_formsemestre_archive( numero_arrete=numero_arrete, code_vdi=code_vdi, show_title=show_title, + pv_title_session=pv_title_session, pv_title=pv_title, with_paragraph_nom=with_paragraph_nom, anonymous=anonymous, @@ -581,6 +583,7 @@ enregistrés et non modifiables, on peut les retrouver ultérieurement. signature=signature, numero_arrete=tf[2]["numero_arrete"], code_vdi=tf[2]["code_vdi"], + pv_title_session=tf[2]["pv_title_session"], pv_title=tf[2]["pv_title"], show_title=tf[2]["show_title"], with_paragraph_nom=tf[2]["with_paragraph_nom"], diff --git a/app/scodoc/sco_pv_forms.py b/app/scodoc/sco_pv_forms.py index 014a8422..4441b5d6 100644 --- a/app/scodoc/sco_pv_forms.py +++ b/app/scodoc/sco_pv_forms.py @@ -414,6 +414,7 @@ def formsemestre_pvjury_pdf(formsemestre_id, group_ids: list[int] = None, etudid date_commission=tf[2]["date_commission"], date_jury=tf[2]["date_jury"], show_title=tf[2]["show_title"], + pv_title_session=tf[2]["pv_title_session"], pv_title=tf[2]["pv_title"], with_paragraph_nom=tf[2]["with_paragraph_nom"], anonymous=tf[2]["anonymous"], @@ -469,11 +470,21 @@ def descrform_pvjury(formsemestre: FormSemestre): "explanation": "VDI et code du diplôme Apogée (format libre, n'est pas vérifié par ScoDoc)", }, ), + ( + "pv_title_session", + { + "input_type": "text", + "size": 48, + "title": "Nom de la session", + "explanation": "utilisé dans le titre du PV", + "default": "Session unique", + }, + ), ( "pv_title", { "input_type": "text", - "size": 64, + "size": 96, "title": "Titre du PV", "explanation": "par défaut, titre officiel de la formation", "default": f_dict["titre_officiel"], diff --git a/app/scodoc/sco_pv_pdf.py b/app/scodoc/sco_pv_pdf.py index 6c84deb9..551888fe 100644 --- a/app/scodoc/sco_pv_pdf.py +++ b/app/scodoc/sco_pv_pdf.py @@ -53,6 +53,7 @@ from app.scodoc.sco_pdf import SU from app.scodoc.sco_pv_templates import PVTemplate, jury_titres import sco_version + # ---------------------------------------------- def pvjury_pdf( formsemestre: FormSemestre, @@ -63,6 +64,7 @@ def pvjury_pdf( code_vdi=None, show_title=False, pv_title=None, + pv_title_session=None, with_paragraph_nom=False, anonymous=False, ) -> bytes: @@ -78,6 +80,7 @@ def pvjury_pdf( code_vdi=code_vdi, date_jury=date_jury, show_title=show_title, + pv_title_session=pv_title_session, pv_title=pv_title, with_paragraph_nom=with_paragraph_nom, anonymous=anonymous, @@ -102,6 +105,7 @@ def pvjury_pdf( numero_arrete=numero_arrete, code_vdi=code_vdi, show_title=show_title, + pv_title_session=pv_title_session, pv_title=pv_title, with_paragraph_nom=with_paragraph_nom, anonymous=anonymous, @@ -161,6 +165,7 @@ def _pvjury_pdf_type( code_vdi=None, show_title=False, pv_title=None, + pv_title_session=None, anonymous=False, with_paragraph_nom=False, ) -> tuple[list, bool]: @@ -185,7 +190,9 @@ def _pvjury_pdf_type( f""" Procès-verbal de {titre_jury} du département { sco_preferences.get_preference("DeptName", formsemestre.id) or "(sans nom)" - } - Session unique {formsemestre.annee_scolaire()} + } - {pv_title_session} { + formsemestre.annee_scolaire()} - { + formsemestre.annee_scolaire()+1} """, style, )