small fixes

This commit is contained in:
Emmanuel Viennet 2022-03-14 10:56:25 +01:00
parent 370404341c
commit 766ea31be5
4 changed files with 12 additions and 8 deletions

View File

@ -380,10 +380,10 @@ class BulletinGeneratorStandard(sco_bulletins_generator.BulletinGenerator):
t = { t = {
"titre": "Moyenne générale:", "titre": "Moyenne générale:",
"rang": I["rang_nt"], "rang": I["rang_nt"],
"note": I["moy_gen"], "note": I.get("moy_gen", "-"),
"min": I["moy_min"], "min": I.get("moy_min", "-"),
"max": I["moy_max"], "max": I.get("moy_max", "-"),
"moy": I["moy_moy"], "moy": I.get("moy_moy", "-"),
"abs": "%s / %s" % (nbabs, nbabsjust), "abs": "%s / %s" % (nbabs, nbabsjust),
"_css_row_class": "notes_bulletin_row_gen", "_css_row_class": "notes_bulletin_row_gen",
"_titre_colspan": 2, "_titre_colspan": 2,

View File

@ -166,7 +166,7 @@ def html_edit_formation_apc(
def html_ue_infos(ue): def html_ue_infos(ue):
"""page d'information sur une UE""" """Page d'information sur une UE"""
from app.views import ScoData from app.views import ScoData
formsemestres = ( formsemestres = (
@ -189,7 +189,6 @@ def html_ue_infos(ue):
) )
return render_template( return render_template(
"pn/ue_infos.html", "pn/ue_infos.html",
# "pn/tmp.html",
titre=f"UE {ue.acronyme} {ue.titre}", titre=f"UE {ue.acronyme} {ue.titre}",
ue=ue, ue=ue,
formsemestres=formsemestres, formsemestres=formsemestres,

View File

@ -97,7 +97,12 @@ class ScoData:
self.sem.to_dict() self.sem.to_dict()
) )
# --- Préférences # --- Préférences
self.prefs = sco_preferences.SemPreferences(formsemestre.id) # prefs fallback to global pref if sem is None:
if formsemestre:
formsemestre_id = formsemestre.id
else:
formsemestre_id = None
self.prefs = sco_preferences.SemPreferences(formsemestre_id)
from app.views import scodoc, notes, scolar, absences, users, pn_modules, refcomp from app.views import scodoc, notes, scolar, absences, users, pn_modules, refcomp

View File

@ -1,7 +1,7 @@
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.1.78" SCOVERSION = "9.1.79"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"