From d64e6632f08f78a6ac0e428551a9b28e77c2ab2a Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 5 Jul 2021 23:53:23 +0200 Subject: [PATCH] fix routes --- app/scodoc/sco_archives_etud.py | 2 +- app/scodoc/sco_page_etud.py | 9 ++++++++- app/views/notes.py | 1 + app/views/scolar.py | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_archives_etud.py b/app/scodoc/sco_archives_etud.py index 4ffb41793..282ed8704 100644 --- a/app/scodoc/sco_archives_etud.py +++ b/app/scodoc/sco_archives_etud.py @@ -247,7 +247,7 @@ def etudarchive_generate_excel_sample(context, group_id=None, REQUEST=None): def etudarchive_import_files_form(context, group_id, REQUEST=None): - """Formualaire pour importation fichiers d'un groupe""" + """Formulaire pour importation fichiers d'un groupe""" H = [ html_sco_header.sco_header( context, REQUEST, page_title="Import de fichiers associés aux étudiants" diff --git a/app/scodoc/sco_page_etud.py b/app/scodoc/sco_page_etud.py index 07e11e7fb..f38813108 100644 --- a/app/scodoc/sco_page_etud.py +++ b/app/scodoc/sco_page_etud.py @@ -102,7 +102,12 @@ def _menuScolarite(context, authuser, sem, etudid): "enabled": authuser.has_permission(Permission.ScoEtudInscrit) and not locked, }, - {"title": def_title, "endpoint": def_url, "enabled": def_enabled}, + { + "title": def_title, + "endpoint": def_url, + "args": args, + "enabled": def_enabled, + }, { "title": "Inscrire à un module optionnel (ou au sport)", "endpoint": "notes.formsemestre_inscription_option", @@ -113,6 +118,7 @@ def _menuScolarite(context, authuser, sem, etudid): { "title": "Désinscrire (en cas d'erreur)", "endpoint": "notes.formsemestre_desinscription", + "args": args, "enabled": authuser.has_permission(Permission.ScoEtudInscrit) and not locked, }, @@ -125,6 +131,7 @@ def _menuScolarite(context, authuser, sem, etudid): { "title": "Enregistrer un semestre effectué ailleurs", "endpoint": "notes.formsemestre_ext_create_form", + "args": args, "enabled": authuser.has_permission(Permission.ScoImplement), }, ] diff --git a/app/views/notes.py b/app/views/notes.py index a1f98dc51..3b214c482 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -1428,6 +1428,7 @@ sco_publish( "/formsemestre_inscription_option", sco_formsemestre_inscriptions.formsemestre_inscription_option, Permission.ScoEtudInscrit, + methods=["GET", "POST"], ) sco_publish( "/do_moduleimpl_incription_options", diff --git a/app/views/scolar.py b/app/views/scolar.py index 1eb532711..376eb90cf 100644 --- a/app/views/scolar.py +++ b/app/views/scolar.py @@ -915,7 +915,7 @@ def _do_dem_or_def_etud( return REQUEST.RESPONSE.redirect("ficheEtud?etudid=" + etudid) -@bp.route("/doCancelDem") +@bp.route("/doCancelDem", methods=["GET", "POST"]) @permission_required(Permission.ScoEtudInscrit) @scodoc7func(context) def doCancelDem( @@ -937,7 +937,7 @@ def doCancelDem( ) -@bp.route("/doCancelDef") +@bp.route("/doCancelDef", methods=["GET", "POST"]) @permission_required(Permission.ScoEtudInscrit) @scodoc7func(context) def doCancelDef(