From 4b3ac58bc04762a1c102cfa97afecd207ef82780 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 29 Jul 2021 17:48:27 +0300 Subject: [PATCH] bug fix --- app/scodoc/html_sidebar.py | 28 ++++++++++++++-------------- app/scodoc/sco_abs.py | 4 +++- app/scodoc/sco_evaluations.py | 4 ++-- app/views/absences.py | 2 -- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/scodoc/html_sidebar.py b/app/scodoc/html_sidebar.py index 8bcdb487f..838fc9b4f 100644 --- a/app/scodoc/html_sidebar.py +++ b/app/scodoc/html_sidebar.py @@ -45,33 +45,33 @@ def sidebar_common(): "UsersURL": scu.UsersURL(), "NotesURL": scu.NotesURL(), "AbsencesURL": scu.AbsencesURL(), - "LogoutURL": url_for("auth.logout"), "authuser": current_user.user_name, } H = [ - 'ScoDoc 8', - '
%(authuser)s
déconnexion
' - % params, - sidebar_dept(), - """

Scolarité

- Semestres
- Programmes
- Absences
- """ - % params, + f"""ScoDoc 8 +
{current_user.user_name} +
déconnexion +
+ {sidebar_dept()} +

Scolarité

+ Semestres
+ Programmes
+ Absences
+ """ ] if current_user.has_permission( Permission.ScoUsersAdmin ) or current_user.has_permission(Permission.ScoUsersView): H.append( - """Utilisateurs
""" % params + f"""Utilisateurs
""" ) if current_user.has_permission(Permission.ScoChangePreferences): H.append( - """Paramétrage
""" - % params + f"""Paramétrage
""" ) return "".join(H) diff --git a/app/scodoc/sco_abs.py b/app/scodoc/sco_abs.py index 13db0e33c..34116e136 100644 --- a/app/scodoc/sco_abs.py +++ b/app/scodoc/sco_abs.py @@ -867,7 +867,9 @@ def MonthTableBody( if pad_width != None: n = pad_width - len(legend) # pad to 8 cars if n > 0: - legend = " " * (n / 2) + legend + " " * ((n + 1) / 2) + legend = ( + " " * (n // 2) + legend + " " * ((n + 1) // 2) + ) else: legend = " " # empty cell cc.append(legend) diff --git a/app/scodoc/sco_evaluations.py b/app/scodoc/sco_evaluations.py index e1a54898d..b39aae6ee 100644 --- a/app/scodoc/sco_evaluations.py +++ b/app/scodoc/sco_evaluations.py @@ -626,7 +626,6 @@ def do_evaluation_get_all_notes( do_cache = ( filter_suppressed and table == "notes_notes" and (by_uid is None) ) # pas de cache pour (rares) appels via undo_notes ou specifiant un enseignant - log(f"do_evaluation_get_all_notes: {evaluation_id} (do_cache={do_cache})") if do_cache: r = sco_cache.EvaluationCache.get(evaluation_id) if r != None: @@ -652,7 +651,8 @@ def do_evaluation_get_all_notes( d[x["etudid"]] = x if do_cache: status = sco_cache.EvaluationCache.set(evaluation_id, d) - log(f"EvaluationCache.set: {evaluation_id}\t{status}") + if not status: + log(f"Warning: EvaluationCache.set: {evaluation_id}\t{status}") return d diff --git a/app/views/absences.py b/app/views/absences.py index 279b9f75c..228569630 100644 --- a/app/views/absences.py +++ b/app/views/absences.py @@ -382,7 +382,6 @@ def SignaleAbsenceGrHebdo( H = [ html_sco_header.sco_header( - context, page_title="Saisie hebdomadaire des absences", init_qtip=True, javascripts=html_sco_header.BOOTSTRAP_MULTISELECT_JS @@ -393,7 +392,6 @@ def SignaleAbsenceGrHebdo( ], cssstyles=CSSSTYLES, no_side_bar=1, - REQUEST=REQUEST, ), """

Saisie des absences %s %s,