From 2731a4728bd3af132aecf1219bde3fadb1b8f426 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 30 Sep 2022 23:29:06 +0200 Subject: [PATCH] =?UTF-8?q?N'impose=20pas=20la=20pr=C3=A9sence=20de=20code?= =?UTF-8?q?s=20Apog=C3=A9e=20sur=20les=20=C3=A9l=C3=A9ments=20des=20semest?= =?UTF-8?q?res=20ext=C3=A9rieurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_formsemestre_edit.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_formsemestre_edit.py b/app/scodoc/sco_formsemestre_edit.py index 230d8fada..f1e601631 100644 --- a/app/scodoc/sco_formsemestre_edit.py +++ b/app/scodoc/sco_formsemestre_edit.py @@ -414,7 +414,8 @@ def do_formsemestre_createwithmodules(edit=False): "explanation": "associé(s) au résultat du semestre (ex: VRTW1). Inutile en BUT. Séparés par des virgules.", "allow_null": not sco_preferences.get_preference( "always_require_apo_sem_codes" - ), + ) + or formsemestre.modalite == "EXT", }, ) ) @@ -427,7 +428,8 @@ def do_formsemestre_createwithmodules(edit=False): "explanation": "associé(s) au résultat de l'année (ex: VRT1A). Séparés par des virgules.", "allow_null": not sco_preferences.get_preference( "always_require_apo_sem_codes" - ), + ) + or formsemestre.modalite == "EXT", }, ) ) @@ -740,8 +742,13 @@ def do_formsemestre_createwithmodules(edit=False): # check dates if ndb.DateDMYtoISO(tf[2]["date_debut"]) > ndb.DateDMYtoISO(tf[2]["date_fin"]): msg = '' - if sco_preferences.get_preference("always_require_apo_sem_codes") and not any( - [tf[2]["etape_apo" + str(n)] for n in range(0, scu.EDIT_NB_ETAPES + 1)] + if ( + formsemestre.modalite + != "EXT" # n'impose pas d'Apo pour les sem. extérieurs + and sco_preferences.get_preference("always_require_apo_sem_codes") + and not any( + [tf[2]["etape_apo" + str(n)] for n in range(0, scu.EDIT_NB_ETAPES + 1)] + ) ): msg = ''