3 petits correctifs (bulletins anciens)
This commit is contained in:
parent
2ad1c4eed2
commit
53dc7e7529
@ -175,7 +175,7 @@ def bulletin_but_xml_compat(
|
||||
x_ue.append(Element("rang", value=str(rang_ue)))
|
||||
x_ue.append(Element("effectif", value=str(nb_inscrits_ue)))
|
||||
# Liste les modules rattachés à cette UE
|
||||
for modimpl in results.modimpls:
|
||||
for modimpl in results.formsemestre.modimpls:
|
||||
# Liste ici uniquement les modules rattachés à cette UE
|
||||
if modimpl.module.ue.id == ue.id:
|
||||
# mod_moy = scu.fmt_note(results.etud_moy_ue[ue.id][etud.id])
|
||||
|
@ -254,7 +254,10 @@ def formsemestre_bulletinetud_published_dict(
|
||||
m["note"][k] = scu.fmt_note(m["note"][k])
|
||||
|
||||
u["module"].append(m)
|
||||
if sco_preferences.get_preference("bul_show_mod_rangs", formsemestre_id):
|
||||
if (
|
||||
sco_preferences.get_preference("bul_show_mod_rangs", formsemestre_id)
|
||||
and nt.mod_rangs is not None
|
||||
):
|
||||
m["rang"] = dict(
|
||||
value=nt.mod_rangs[modimpl["moduleimpl_id"]][0][etudid]
|
||||
)
|
||||
|
@ -271,7 +271,10 @@ def make_xml_formsemestre_bulletinetud(
|
||||
moy=scu.fmt_note(modstat["moy"]),
|
||||
)
|
||||
)
|
||||
if sco_preferences.get_preference("bul_show_mod_rangs", formsemestre_id):
|
||||
if (
|
||||
sco_preferences.get_preference("bul_show_mod_rangs", formsemestre_id)
|
||||
and nt.mod_rangs is not None
|
||||
):
|
||||
x_mod.append(
|
||||
Element(
|
||||
"rang",
|
||||
|
@ -227,7 +227,10 @@ def get_mention(moy):
|
||||
moy = float(moy)
|
||||
except:
|
||||
return ""
|
||||
return NOTES_MENTIONS_LABS[bisect.bisect_right(NOTES_MENTIONS_TH, moy)]
|
||||
if moy > 0.0:
|
||||
return NOTES_MENTIONS_LABS[bisect.bisect_right(NOTES_MENTIONS_TH, moy)]
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
class DictDefault(dict): # obsolete, use collections.defaultdict
|
||||
|
Loading…
Reference in New Issue
Block a user