forked from ScoDoc/ScoDoc
bug fix
This commit is contained in:
parent
8fedde52e7
commit
4b3ac58bc0
@ -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 = [
|
||||
'<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>'
|
||||
% params,
|
||||
sidebar_dept(),
|
||||
"""<h2 class="insidebar">Scolarité</h2>
|
||||
<a href="%(ScoURL)s" class="sidebar">Semestres</a> <br/>
|
||||
<a href="%(NotesURL)s" class="sidebar">Programmes</a> <br/>
|
||||
<a href="%(AbsencesURL)s" class="sidebar">Absences</a> <br/>
|
||||
f"""<a class="scodoc_title" href="about">ScoDoc 8</a>
|
||||
<div id="authuser"><a id="authuserlink" href="{
|
||||
url_for("users.user_info_page", scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
|
||||
}">{current_user.user_name}</a>
|
||||
<br/><a id="deconnectlink" href="{url_for("auth.logout")}">déconnexion</a>
|
||||
</div>
|
||||
{sidebar_dept()}
|
||||
<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(
|
||||
Permission.ScoUsersAdmin
|
||||
) or current_user.has_permission(Permission.ScoUsersView):
|
||||
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):
|
||||
H.append(
|
||||
"""<a href="%(ScoURL)s/edit_preferences" class="sidebar">Paramétrage</a> <br/>"""
|
||||
% params
|
||||
f"""<a href="{url_for("scolar.edit_preferences", scodoc_dept=g.scodoc_dept)}" class="sidebar">Paramétrage</a> <br/>"""
|
||||
)
|
||||
|
||||
return "".join(H)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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,
|
||||
),
|
||||
"""<table border="0" cellspacing="16"><tr><td>
|
||||
<h2>Saisie des absences %s %s,
|
||||
|
Loading…
Reference in New Issue
Block a user