From 03b9a92ba8cb59a3d085bc9711b4b769c8a5f362 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 5 Sep 2023 22:50:01 +0200 Subject: [PATCH] =?UTF-8?q?Ajoute=20liens=20sur=20bulletins=20BUT,=20pr?= =?UTF-8?q?=C3=A9cise=20ann=C3=A9e=20de=20validation,=20corrige=20bug=20af?= =?UTF-8?q?fichage=20decision=20ann=C3=A9ee=20BUT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/bulletin_but_court_pdf.py | 3 ++- app/models/but_validations.py | 4 ++- app/scodoc/sco_bulletins_json.py | 1 + app/static/css/bulletin_court.css | 10 +++++-- app/static/css/releve-but.css | 2 +- app/static/css/scodoc.css | 2 +- app/templates/bul_head.j2 | 25 +++++++++++------- app/templates/but/bulletin_court_page.j2 | 33 ++++++++++++++---------- 8 files changed, 51 insertions(+), 29 deletions(-) diff --git a/app/but/bulletin_but_court_pdf.py b/app/but/bulletin_but_court_pdf.py index edd8c0a351..abd90015b5 100644 --- a/app/but/bulletin_but_court_pdf.py +++ b/app/but/bulletin_but_court_pdf.py @@ -503,7 +503,8 @@ class BulletinGeneratorBUTCourt(BulletinGeneratorStandard): txt += f""" Jury tenu le { datetime.datetime.fromisoformat(self.bul["semestre"]["decision_annee"]["date"]).strftime("%d/%m/%Y") - }, année BUT {self.bul["semestre"]["decision_annee"]["code"]}. + }, année BUT{self.bul["semestre"]["decision_annee"]["ordre"]} + {self.bul["semestre"]["decision_annee"]["code"]}.
""" if self.bul["semestre"].get("autorisation_inscription", None): diff --git a/app/models/but_validations.py b/app/models/but_validations.py index 6a3939a642..539c1239da 100644 --- a/app/models/but_validations.py +++ b/app/models/but_validations.py @@ -214,10 +214,12 @@ def dict_decision_jury(etud: Identite, formsemestre: FormSemestre) -> dict: decisions["decision_rcue"] = [] decisions["descr_decisions_rcue"] = "" decisions["descr_decisions_niveaux"] = "" - # --- Année: prend la validation pour l'année scolaire de ce semestre + # --- Année: prend la validation pour l'année scolaire et l'ordre de ce semestre + annee_but = (formsemestre.semestre_id + 1) // 2 validation = ApcValidationAnnee.query.filter_by( etudid=etud.id, annee_scolaire=formsemestre.annee_scolaire(), + ordre=annee_but, referentiel_competence_id=formsemestre.formation.referentiel_competence_id, ).first() if validation: diff --git a/app/scodoc/sco_bulletins_json.py b/app/scodoc/sco_bulletins_json.py index e5e7693d55..df54776949 100644 --- a/app/scodoc/sco_bulletins_json.py +++ b/app/scodoc/sco_bulletins_json.py @@ -405,6 +405,7 @@ def dict_decision_jury( """dict avec decision pour bulletins json - autorisation_inscription - decision : décision semestre + - decision_annee : annee BUT - decision_ue : list des décisions UE - situation diff --git a/app/static/css/bulletin_court.css b/app/static/css/bulletin_court.css index 6e16b6b703..614a332115 100644 --- a/app/static/css/bulletin_court.css +++ b/app/static/css/bulletin_court.css @@ -5,11 +5,17 @@ } } +div.but_bul_court_links { + margin-left: 16px; + margin-bottom: 16px; +} + div.but_bul_court { - width: 17cm; + /* width: 17cm; */ display: grid; - grid-template-columns: 6cm 11cm; font-size: 11pt; + grid-template-columns: 6cm 11cm; + margin-left: 16px; } #infos_etudiant { diff --git a/app/static/css/releve-but.css b/app/static/css/releve-but.css index 1f7a492c96..25a31c972e 100644 --- a/app/static/css/releve-but.css +++ b/app/static/css/releve-but.css @@ -28,7 +28,7 @@ main { ; --couleurSurlignage: rgba(255, 253, 110, 0.49); max-width: 1000px; - margin: auto; + margin-left: 16px; display: none; } diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css index 9312a5d650..05107dc4bf 100644 --- a/app/static/css/scodoc.css +++ b/app/static/css/scodoc.css @@ -3077,7 +3077,7 @@ div.bul_foot { border-radius: 16px; border: 1px solid #AAA; padding: 16px 32px; - margin: auto; + margin-left: 16px; } div.bull_appreciations { diff --git a/app/templates/bul_head.j2 b/app/templates/bul_head.j2 index 89fa768998..c851fa5775 100644 --- a/app/templates/bul_head.j2 +++ b/app/templates/bul_head.j2 @@ -42,17 +42,24 @@ format='pdf', version=version, )}}">{{scu.ICON_PDF|safe}} - {% if formsemestre.formation.is_apc() %} - version courte spéciale BUT - {% endif %} + {% if formsemestre.formation.is_apc() %} +
+ version courte spéciale BUT + visualiser les compétences BUT +
+ {% endif %} {% if not is_apc %} diff --git a/app/templates/but/bulletin_court_page.j2 b/app/templates/but/bulletin_court_page.j2 index 1068e01671..d73c6f389a 100644 --- a/app/templates/but/bulletin_court_page.j2 +++ b/app/templates/but/bulletin_court_page.j2 @@ -39,19 +39,23 @@ {%- endmacro %} {% block app_content %} -

-version pdf {{scu.ICON_PDF|safe}} -version complète -

- +
{{etud.nomprenom}}
@@ -157,7 +161,8 @@ Jury tenu le {{ datetime.datetime.fromisoformat(bul.semestre.decision_annee.date).strftime("%d/%m/%Y") }}, - année BUT {{bul.semestre.decision_annee.code}}. + année BUT{{bul.semestre.decision_annee.ordre}} + {{bul.semestre.decision_annee.code}}. {% endif %} {% set virg = joiner(", ") %} {% for aut in bul.semestre.autorisation_inscription -%}