This commit is contained in:
Emmanuel Viennet 2021-07-29 17:48:27 +03:00
parent 8fedde52e7
commit 4b3ac58bc0
4 changed files with 19 additions and 19 deletions

View File

@ -45,33 +45,33 @@ def sidebar_common():
"UsersURL": scu.UsersURL(), "UsersURL": scu.UsersURL(),
"NotesURL": scu.NotesURL(), "NotesURL": scu.NotesURL(),
"AbsencesURL": scu.AbsencesURL(), "AbsencesURL": scu.AbsencesURL(),
"LogoutURL": url_for("auth.logout"),
"authuser": current_user.user_name, "authuser": current_user.user_name,
} }
H = [ H = [
'<a class="scodoc_title" href="about">ScoDoc 8</a>', f"""<a class="scodoc_title" href="about">ScoDoc 8</a>
'<div id="authuser"><a id="authuserlink" href="%(ScoURL)s/Users/user_info_page">%(authuser)s</a><br/><a id="deconnectlink" href="%(LogoutURL)s">déconnexion</a></div>' <div id="authuser"><a id="authuserlink" href="{
% params, url_for("users.user_info_page", scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
sidebar_dept(), }">{current_user.user_name}</a>
"""<h2 class="insidebar">Scolarité</h2> <br/><a id="deconnectlink" href="{url_for("auth.logout")}">déconnexion</a>
<a href="%(ScoURL)s" class="sidebar">Semestres</a> <br/> </div>
<a href="%(NotesURL)s" class="sidebar">Programmes</a> <br/> {sidebar_dept()}
<a href="%(AbsencesURL)s" class="sidebar">Absences</a> <br/> <h2 class="insidebar">Scolarité</h2>
<a href="{scu.ScoURL()}" class="sidebar">Semestres</a> <br/>
<a href="{scu.NotesURL()}" class="sidebar">Programmes</a> <br/>
<a href="{scu.AbsencesURL()}" class="sidebar">Absences</a> <br/>
""" """
% params,
] ]
if current_user.has_permission( if current_user.has_permission(
Permission.ScoUsersAdmin Permission.ScoUsersAdmin
) or current_user.has_permission(Permission.ScoUsersView): ) or current_user.has_permission(Permission.ScoUsersView):
H.append( H.append(
"""<a href="%(UsersURL)s" class="sidebar">Utilisateurs</a> <br/>""" % params f"""<a href="{scu.UsersURL()}" class="sidebar">Utilisateurs</a> <br/>"""
) )
if current_user.has_permission(Permission.ScoChangePreferences): if current_user.has_permission(Permission.ScoChangePreferences):
H.append( H.append(
"""<a href="%(ScoURL)s/edit_preferences" class="sidebar">Paramétrage</a> <br/>""" f"""<a href="{url_for("scolar.edit_preferences", scodoc_dept=g.scodoc_dept)}" class="sidebar">Paramétrage</a> <br/>"""
% params
) )
return "".join(H) return "".join(H)

View File

@ -867,7 +867,9 @@ def MonthTableBody(
if pad_width != None: if pad_width != None:
n = pad_width - len(legend) # pad to 8 cars n = pad_width - len(legend) # pad to 8 cars
if n > 0: if n > 0:
legend = "&nbsp;" * (n / 2) + legend + "&nbsp;" * ((n + 1) / 2) legend = (
"&nbsp;" * (n // 2) + legend + "&nbsp;" * ((n + 1) // 2)
)
else: else:
legend = "&nbsp;" # empty cell legend = "&nbsp;" # empty cell
cc.append(legend) cc.append(legend)

View File

@ -626,7 +626,6 @@ def do_evaluation_get_all_notes(
do_cache = ( do_cache = (
filter_suppressed and table == "notes_notes" and (by_uid is None) filter_suppressed and table == "notes_notes" and (by_uid is None)
) # pas de cache pour (rares) appels via undo_notes ou specifiant un enseignant ) # 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: if do_cache:
r = sco_cache.EvaluationCache.get(evaluation_id) r = sco_cache.EvaluationCache.get(evaluation_id)
if r != None: if r != None:
@ -652,7 +651,8 @@ def do_evaluation_get_all_notes(
d[x["etudid"]] = x d[x["etudid"]] = x
if do_cache: if do_cache:
status = sco_cache.EvaluationCache.set(evaluation_id, d) 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 return d

View File

@ -382,7 +382,6 @@ def SignaleAbsenceGrHebdo(
H = [ H = [
html_sco_header.sco_header( html_sco_header.sco_header(
context,
page_title="Saisie hebdomadaire des absences", page_title="Saisie hebdomadaire des absences",
init_qtip=True, init_qtip=True,
javascripts=html_sco_header.BOOTSTRAP_MULTISELECT_JS javascripts=html_sco_header.BOOTSTRAP_MULTISELECT_JS
@ -393,7 +392,6 @@ def SignaleAbsenceGrHebdo(
], ],
cssstyles=CSSSTYLES, cssstyles=CSSSTYLES,
no_side_bar=1, no_side_bar=1,
REQUEST=REQUEST,
), ),
"""<table border="0" cellspacing="16"><tr><td> """<table border="0" cellspacing="16"><tr><td>
<h2>Saisie des absences %s %s, <h2>Saisie des absences %s %s,