From 5dfdf4265eea74a5b6400aaddf1bfe472fd8e7b5 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 28 Sep 2021 16:10:27 +0200 Subject: [PATCH] autorise chiffres dans user_name --- app/scodoc/sco_liste_notes.py | 4 ++-- sco_version.py | 2 +- tools/import_scodoc7_user_db.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_liste_notes.py b/app/scodoc/sco_liste_notes.py index 672a8754..c2ac6691 100644 --- a/app/scodoc/sco_liste_notes.py +++ b/app/scodoc/sco_liste_notes.py @@ -61,7 +61,7 @@ def do_evaluation_listenotes(): Affichage des notes d'une évaluation args: evaluation_id ou moduleimpl_id - (si moduleimpl_id, affiche toutes les évaluatons du module) + (si moduleimpl_id, affiche toutes les évaluations du module) """ mode = None vals = scu.get_request_args() @@ -69,7 +69,7 @@ def do_evaluation_listenotes(): evaluation_id = int(vals["evaluation_id"]) mode = "eval" evals = sco_evaluations.do_evaluation_list({"evaluation_id": evaluation_id}) - if "moduleimpl_id" in vals: + if "moduleimpl_id" in vals and vals["moduleimpl_id"]: moduleimpl_id = int(vals["moduleimpl_id"]) mode = "module" evals = sco_evaluations.do_evaluation_list({"moduleimpl_id": moduleimpl_id}) diff --git a/sco_version.py b/sco_version.py index 2147fbb7..dd1416cb 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.0.43" +SCOVERSION = "9.0.44" SCONAME = "ScoDoc" diff --git a/tools/import_scodoc7_user_db.py b/tools/import_scodoc7_user_db.py index 91049ca9..36c7a8b3 100644 --- a/tools/import_scodoc7_user_db.py +++ b/tools/import_scodoc7_user_db.py @@ -30,7 +30,7 @@ def import_scodoc7_user_db(scodoc7_db="dbname=SCOUSERS"): # ensure that user_name will match VALID_LOGIN_EXP user_name = scu.purge_chars( user_name, - allowed_chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@\\-_.", + allowed_chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@\\-_.", ) if user_name != u7["user_name"]: msg = f"""Changing login '{u7["user_name"]}' to '{user_name}'"""