Jury BUT: modification menu choix décision RCUE redoublants

This commit is contained in:
Emmanuel Viennet 2023-06-22 07:59:58 +02:00
parent b501233ba4
commit cc39e4a862
2 changed files with 18 additions and 9 deletions

View File

@ -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:
</div>
"""
scoplement = (
f"""<div class="scoplement">{
dec_rcue.validation.html()
}</div>"""
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: <b>{dec_rcue.codes[0]}.</b>
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"""<div class="scoplement">{descr_validation}</div>"""
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:
<div class="but_code">
{_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)}

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.4.89"
SCOVERSION = "9.4.90"
SCONAME = "ScoDoc"