1
0
forked from ScoDoc/ScoDoc

Jury BUT: modification menu choix décision RCUE redoublants

This commit is contained in:
Emmanuel Viennet 2023-06-22 07:59:58 +02:00 committed by iziram
parent 280ceaa255
commit b44563666a
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.models.config import ScoDocSiteConfig
from app.scodoc import html_sco_header 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.sco_exceptions import ScoValueError
from app.scodoc import sco_preferences from app.scodoc import sco_preferences
from app.scodoc import sco_utils as scu from app.scodoc import sco_utils as scu
@ -244,13 +245,21 @@ def _gen_but_rcue(dec_rcue: DecisionsProposeesRCUE, niveau: ApcNiveau) -> str:
</div> </div>
""" """
scoplement = ( code_propose_menu = dec_rcue.code_valide # le code enregistré
f"""<div class="scoplement">{ if dec_rcue.validation:
dec_rcue.validation.html() if dec_rcue.code_valide == dec_rcue.codes[0]:
}</div>""" descr_validation = dec_rcue.validation.html()
if dec_rcue.validation else: # on une validation enregistrée différence de celle proposée
else "" 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é ? # Déjà enregistré ?
niveau_rcue_class = "" niveau_rcue_class = ""
@ -270,7 +279,7 @@ def _gen_but_rcue(dec_rcue: DecisionsProposeesRCUE, niveau: ApcNiveau) -> str:
<div class="but_code"> <div class="but_code">
{_gen_but_select("code_rcue_"+str(niveau.id), {_gen_but_select("code_rcue_"+str(niveau.id),
dec_rcue.codes, dec_rcue.codes,
dec_rcue.code_valide, code_propose_menu,
disabled=True, disabled=True,
klass="manual code_rcue", klass="manual code_rcue",
data = { "niveau_id" : str(niveau.id)} data = { "niveau_id" : str(niveau.id)}

View File

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