From cc39e4a862577eda8bc3d22ee2f7109f38f5eb08 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 22 Jun 2023 07:59:58 +0200 Subject: [PATCH] =?UTF-8?q?Jury=20BUT:=20modification=20menu=20choix=20d?= =?UTF-8?q?=C3=A9cision=20RCUE=20redoublants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/jury_but_view.py | 25 +++++++++++++++++-------- sco_version.py | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/app/but/jury_but_view.py b/app/but/jury_but_view.py index a61f1f14..8775b8bb 100644 --- a/app/but/jury_but_view.py +++ b/app/but/jury_but_view.py @@ -34,6 +34,7 @@ from app.models import ( ) from app.models.config import ScoDocSiteConfig from app.scodoc import html_sco_header +from app.scodoc import codes_cursus as sco_codes from app.scodoc.sco_exceptions import ScoValueError from app.scodoc import sco_preferences from app.scodoc import sco_utils as scu @@ -244,13 +245,21 @@ def _gen_but_rcue(dec_rcue: DecisionsProposeesRCUE, niveau: ApcNiveau) -> str: """ - scoplement = ( - f"""
{ - dec_rcue.validation.html() - }
""" - if dec_rcue.validation - else "" - ) + code_propose_menu = dec_rcue.code_valide # le code enregistré + if dec_rcue.validation: + if dec_rcue.code_valide == dec_rcue.codes[0]: + descr_validation = dec_rcue.validation.html() + else: # on une validation enregistrée différence de celle proposée + descr_validation = f"""Décision recommandée: {dec_rcue.codes[0]}. + Il y avait {dec_rcue.validation.html()}""" + if ( + sco_codes.BUT_CODES_ORDERED[dec_rcue.codes[0]] + > sco_codes.BUT_CODES_ORDERED[dec_rcue.code_valide] + ): + code_propose_menu = dec_rcue.codes[0] + scoplement = f"""
{descr_validation}
""" + else: + scoplement = "" # "pas de validation" # Déjà enregistré ? niveau_rcue_class = "" @@ -270,7 +279,7 @@ def _gen_but_rcue(dec_rcue: DecisionsProposeesRCUE, niveau: ApcNiveau) -> str:
{_gen_but_select("code_rcue_"+str(niveau.id), dec_rcue.codes, - dec_rcue.code_valide, + code_propose_menu, disabled=True, klass="manual code_rcue", data = { "niveau_id" : str(niveau.id)} diff --git a/sco_version.py b/sco_version.py index 0ff96a93..7be8d568 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.4.89" +SCOVERSION = "9.4.90" SCONAME = "ScoDoc"