diff --git a/app/scodoc/TrivialFormulator.py b/app/scodoc/TrivialFormulator.py index 0e925ce9d..8bc15bda7 100644 --- a/app/scodoc/TrivialFormulator.py +++ b/app/scodoc/TrivialFormulator.py @@ -442,8 +442,9 @@ class TF(object): self.formid}_submit" id="{self.formid}_submit" value="{self.submitlabel }" {' '.join(self.submitbuttonattributes)}/>""" if self.cancelbutton: - buttons_markup += f""" """ + buttons_markup += f""" """ buttons_markup += "" R = [] diff --git a/app/scodoc/sco_formsemestre_edit.py b/app/scodoc/sco_formsemestre_edit.py index 0060b9b03..0e189dafe 100644 --- a/app/scodoc/sco_formsemestre_edit.py +++ b/app/scodoc/sco_formsemestre_edit.py @@ -706,8 +706,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N def opt_selected(gid): if gid == vals.get(select_name): return "selected" - else: - return "" + return "" if mod.id in module_ids_set: # pas de menu inscription si le module est déjà présent @@ -866,7 +865,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N {msg} {tf[1]} """ - elif tf[0] == -1: + if tf[0] == -1: # Annulation if formsemestre: return redirect( url_for( @@ -876,6 +875,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N ) ) return redirect(url_for("notes.index_html", scodoc_dept=g.scodoc_dept)) + # Edition ou modification du semestre tf[2]["gestion_compensation"] = bool(tf[2]["gestion_compensation_lst"]) tf[2]["gestion_semestrielle"] = bool(tf[2]["gestion_semestrielle_lst"]) @@ -890,6 +890,7 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N # (retire le "MI" du début du nom de champs) module_ids_checked = [int(x[2:]) for x in tf[2]["tf-checked"]] _formsemestre_check_ue_bonus_unicity(module_ids_checked) + ok = False if not edit: if is_apc: _formsemestre_check_module_list(module_ids_checked, tf[2]["semestre_id"])