From 79b8520034d5b4b90a42ab9f3926c3c5bc44e008 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 4 Oct 2021 22:30:57 +0200 Subject: [PATCH] redirige les url /ScoDoc/DEPT vers /ScoDoc/DEPT/Scolarite --- app/scodoc/sco_liste_notes.py | 2 +- app/views/scodoc.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_liste_notes.py b/app/scodoc/sco_liste_notes.py index a263ac799..a9ea6ce84 100644 --- a/app/scodoc/sco_liste_notes.py +++ b/app/scodoc/sco_liste_notes.py @@ -374,7 +374,7 @@ def _make_table_notes( columns_ids.append(e["evaluation_id"]) # if anonymous_listing: - rows.sort(key=lambda x: x["code"]) + rows.sort(key=lambda x: x["code"] or "") else: rows.sort( key=lambda x: (x["nom"] or "", x["prenom"] or "") diff --git a/app/views/scodoc.py b/app/views/scodoc.py index 66e7cd2fb..aad2e919f 100644 --- a/app/views/scodoc.py +++ b/app/views/scodoc.py @@ -82,6 +82,12 @@ def index(): ) +# Renvoie les url /ScoDoc/RT/ vers /ScoDoc/RT/Scolarite +@bp.route("/ScoDoc//") +def index_dept(scodoc_dept): + return redirect(url_for("scolar.index_html", scodoc_dept=scodoc_dept)) + + @bp.route("/ScoDoc/table_etud_in_accessible_depts", methods=["POST"]) @login_required def table_etud_in_accessible_depts():