diff --git a/app/scodoc/pe_tools.py b/app/scodoc/pe_tools.py index f119d26c3..278d8e2be 100644 --- a/app/scodoc/pe_tools.py +++ b/app/scodoc/pe_tools.py @@ -87,7 +87,7 @@ def print_semestres_description(sems, avec_affichage_debug=False): + sem["anneescolaire"] ) desc += " (" + sem["annee_debut"] + "/" + sem["annee_fin"] + ") " - desc += str(sem["formation_id"]) + " / " + sem["formsemestre_id"] + desc += str(sem["formation_id"]) + " / " + str(sem["formsemestre_id"]) desc += " - " + sem["titre_num"] return desc diff --git a/app/scodoc/sco_evaluations.py b/app/scodoc/sco_evaluations.py index b12b5dba2..7228a4f9e 100644 --- a/app/scodoc/sco_evaluations.py +++ b/app/scodoc/sco_evaluations.py @@ -883,15 +883,21 @@ def formsemestre_evaluations_delai_correction( e["delai_correction"] = None e["module_code"] = Mod["code"] - e["_module_code_target"] = ( - "moduleimpl_status?moduleimpl_id=" + M["moduleimpl_id"] + e["_module_code_target"] = url_for( + "notes.moduleimpl_status", + scodoc_dept=g.scodoc_dept, + moduleimpl_id=M["moduleimpl_id"], ) e["module_titre"] = Mod["titre"] e["responsable_id"] = M["responsable_id"] e["responsable_nomplogin"] = sco_users.user_info(M["responsable_id"])[ "nomplogin" ] - e["_jour_target"] = "evaluation_listenotes?evaluation_id=" + e["evaluation_id"] + e["_jour_target"] = url_for( + "notes.evaluation_listenotes", + scodoc_dept=g.scodoc_dept, + evaluation_id=e["evaluation_id"], + ) T.append(e) columns_ids = ( diff --git a/app/scodoc/sco_formsemestre_custommenu.py b/app/scodoc/sco_formsemestre_custommenu.py index 4bd042e7d..dc039057f 100644 --- a/app/scodoc/sco_formsemestre_custommenu.py +++ b/app/scodoc/sco_formsemestre_custommenu.py @@ -28,6 +28,7 @@ """Menu "custom" (défini par l'utilisateur) dans les semestres """ import flask +from flask import g, url_for import app.scodoc.sco_utils as scu import app.scodoc.notesdb as ndb @@ -105,18 +106,18 @@ def formsemestre_custommenu_edit(context, formsemestre_id, REQUEST=None): for item in menu: descr.append( ( - "title_" + item["custommenu_id"], + "title_" + str(item["custommenu_id"]), {"size": 40, "template": '
OK, évaluation supprimée.
- """ - % ( - scu.ScoURL() - + "/Notes/moduleimpl_status?moduleimpl_id=" - + E["moduleimpl_id"] - ) + + f"""OK, évaluation supprimée.
+ """ + html_sco_header.sco_footer() ) diff --git a/misc/example-api-1.py b/misc/example-api-1.py index 18b2b523e..d823aac7c 100644 --- a/misc/example-api-1.py +++ b/misc/example-api-1.py @@ -17,6 +17,7 @@ import requests import urllib3 import pdb from pprint import pprint as pp +from flask import g, url_for # A modifier pour votre serveur: CHECK_CERTIFICATE = False # set to True in production @@ -108,7 +109,11 @@ print( ) print( "Pour vérifier, aller sur: ", - BASEURL + "/Notes/moduleimpl_status?moduleimpl_id=" + mod["moduleimpl_id"], + url_for( + "notes.moduleimpl_status", + scodoc_dept="DEPT", + moduleimpl_id=mod["moduleimpl_id"], + ), ) # ---- Saisie d'une note