From 85005419aea4e0f4f9a592097485f7a261483311 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 19 Oct 2023 21:07:03 +0200 Subject: [PATCH] Clarifie explications validation manuelle RCUE. Commente code. Petits nettoyages. --- app/but/jury_but.py | 2 -- app/comp/res_compat.py | 13 ++++++-- app/comp/res_sem.py | 2 +- app/scodoc/codes_cursus.py | 4 +-- app/scodoc/sco_formsemestre_validation.py | 22 ++++++++----- app/templates/but/validation_rcues.j2 | 40 ++++++++++++++--------- tools/build_release.sh | 2 +- 7 files changed, 51 insertions(+), 34 deletions(-) diff --git a/app/but/jury_but.py b/app/but/jury_but.py index 4309342b..bc3b7285 100644 --- a/app/but/jury_but.py +++ b/app/but/jury_but.py @@ -83,7 +83,6 @@ from app.models.but_validations import ( ApcValidationRCUE, ) from app.models.etudiants import Identite -from app.models.formations import Formation from app.models.formsemestre import FormSemestre from app.models.ues import UniteEns from app.models.validations import ScolarFormSemestreValidation @@ -93,7 +92,6 @@ from app.scodoc.codes_cursus import ( code_rcue_validant, BUT_CODES_ORDER, CODES_RCUE_VALIDES, - CODES_UE_CAPITALISANTS, CODES_UE_VALIDES, RED, UE_STANDARD, diff --git a/app/comp/res_compat.py b/app/comp/res_compat.py index fe411630..2934f1e9 100644 --- a/app/comp/res_compat.py +++ b/app/comp/res_compat.py @@ -304,9 +304,16 @@ class NotesTableCompat(ResultatsSemestre): ) def get_etud_decisions_ue(self, etudid: int) -> dict: - """Decisions du jury pour les UE de cet etudiant, ou None s'il n'y en pas eu. - Ne tient pas compte des UE capitalisées. - { ue_id : { 'code' : ADM|CMP|AJ, 'event_date' : "d/m/y", 'ects' : x } + """Decisions du jury pour les UE de cet etudiant dans ce formsemestre, + ou None s'il n'y en pas eu. + Ne tient pas compte des UE capitalisées ou externes. + { ue_id : { + 'code' : ADM|CMP|AJ|ADSUP|..., + 'event_date' : "d/m/y", + 'ects' : float, nb d'ects validées dans l'UE de ce semestre. + } + ... + } Ne renvoie aucune decision d'UE pour les défaillants """ if self.get_etud_etat(etudid) == DEF: diff --git a/app/comp/res_sem.py b/app/comp/res_sem.py index 35affb5c..212f9710 100644 --- a/app/comp/res_sem.py +++ b/app/comp/res_sem.py @@ -50,7 +50,7 @@ def load_formsemestre_validations(formsemestre: FormSemestre) -> ValidationsSeme If not in cache, build it and cache it (in g). """ if not hasattr(g, "formsemestre_validation_cache"): - g.formsemestre_validations_cache = {} # pylint: disable=C0237 + g.formsemestre_validations_cache = {} else: if formsemestre.id in g.formsemestre_validations_cache: return g.formsemestre_validations_cache[formsemestre.id] diff --git a/app/scodoc/codes_cursus.py b/app/scodoc/codes_cursus.py index d214b350..b11c7b6b 100644 --- a/app/scodoc/codes_cursus.py +++ b/app/scodoc/codes_cursus.py @@ -201,8 +201,8 @@ CODES_SEM_REO = {NAR} # reorientation CODES_JURY_UE = {ADM, CMP, ADJ, ADJR, ADSUP, AJ, ATJ, RAT, DEF, ABAN, DEM, UEBSL} CODES_UE_VALIDES_DE_DROIT = {ADM, CMP} # validation "de droit" CODES_UE_VALIDES = CODES_UE_VALIDES_DE_DROIT | {ADJ, ADJR, ADSUP} -"UE validée" -CODES_UE_CAPITALISANTS = {ADM} +"UE validée (attribution des ECTS)" +CODES_UE_CAPITALISANTS = {ADM} # XXX non utilisé "UE capitalisée" CODES_JURY_RCUE = {ADM, ADJ, ADSUP, CMP, AJ, ATJ, RAT, DEF, ABAN} diff --git a/app/scodoc/sco_formsemestre_validation.py b/app/scodoc/sco_formsemestre_validation.py index 76ce5c29..26d9e6c1 100644 --- a/app/scodoc/sco_formsemestre_validation.py +++ b/app/scodoc/sco_formsemestre_validation.py @@ -367,7 +367,7 @@ def formsemestre_validation_etud_form( H.append( f"""""" ) @@ -683,7 +683,7 @@ def formsemestre_recap_parcours_table( # 2eme ligne: notes H.append(f"""""") H.append( - f""" """ ) if is_prev: @@ -808,7 +808,7 @@ def form_decision_manuelle(Se, formsemestre_id, etudid, desturl="", sortcol=None return true; } - +
@@ -1028,7 +1028,7 @@ def do_formsemestre_validation_auto(formsemestre_id): ] if conflicts: H.append( - f"""

Attention: {len(conflicts)} étudiants non modifiés + f"""

Attention: {len(conflicts)} étudiants non modifiés car décisions différentes déja saisies :