From d57c2c3a4d68f12f570049f8ed910d15163d93af Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 23 Jan 2021 22:57:01 +0100 Subject: [PATCH] Fix --- ZAbsences.py | 21 +++++++++++---------- sco_moduleimpl.py | 5 ++++- sco_pvpdf.py | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ZAbsences.py b/ZAbsences.py index ab194f5ab4..08cef67815 100644 --- a/ZAbsences.py +++ b/ZAbsences.py @@ -70,6 +70,7 @@ from TrivialFormulator import TrivialFormulator, TF from gen_tables import GenTable import scolars import sco_formsemestre +import sco_moduleimpl import sco_groups import sco_groups_view import sco_excel @@ -547,8 +548,8 @@ class ZAbsences( desc = a["description"] if a["moduleimpl_id"] and a["moduleimpl_id"] != "NULL": # Trouver le nom du module - Mlist = self.Notes.do_moduleimpl_withmodule_list( - moduleimpl_id=a["moduleimpl_id"] + Mlist = sco_moduleimpl.do_moduleimpl_withmodule_list( + self.Notes, moduleimpl_id=a["moduleimpl_id"] ) if Mlist: M = Mlist[0] @@ -713,8 +714,8 @@ class ZAbsences( mod_inscrits = set( [ x["etudid"] - for x in self.Notes.do_moduleimpl_inscription_list( - moduleimpl_id=moduleimpl_id + for x in sco_moduleimpl.do_moduleimpl_inscription_list( + self.Notes, moduleimpl_id=moduleimpl_id ) ] ) @@ -847,8 +848,8 @@ class ZAbsences( mod_inscrits = set( [ x["etudid"] - for x in self.Notes.do_moduleimpl_inscription_list( - moduleimpl_id=moduleimpl_id + for x in sco_moduleimpl.do_moduleimpl_inscription_list( + self.Notes, moduleimpl_id=moduleimpl_id ) ] ) @@ -1221,8 +1222,8 @@ class ZAbsences( return "" ex = [] for ev in a["evals"]: - mod = self.Notes.do_moduleimpl_withmodule_list( - moduleimpl_id=ev["moduleimpl_id"] + mod = sco_moduleimpl.do_moduleimpl_withmodule_list( + self.Notes, moduleimpl_id=ev["moduleimpl_id"] )[0] if format == "html": ex.append( @@ -1238,8 +1239,8 @@ class ZAbsences( def descr_abs(a): ex = [] for ev in a.get("absent", []): - mod = self.Notes.do_moduleimpl_withmodule_list( - moduleimpl_id=ev["moduleimpl_id"] + mod = sco_moduleimpl.do_moduleimpl_withmodule_list( + self.Notes, moduleimpl_id=ev["moduleimpl_id"] )[0] if format == "html": ex.append( diff --git a/sco_moduleimpl.py b/sco_moduleimpl.py index b8a6a53b86..df92a442cd 100644 --- a/sco_moduleimpl.py +++ b/sco_moduleimpl.py @@ -240,8 +240,11 @@ def do_moduleimpl_inscrit_etuds( # Inscriptions au module: inmod_set = set( [ + # hum ? x["etudid"] - for x in context.do_moduleimpl_inscription_list(moduleimpl_id=moduleimpl_id) + for x in do_moduleimpl_inscription_list( + context, moduleimpl_id=moduleimpl_id + ) ] ) for etudid in etudids: diff --git a/sco_pvpdf.py b/sco_pvpdf.py index 9ce9b14ad8..fa276791c4 100644 --- a/sco_pvpdf.py +++ b/sco_pvpdf.py @@ -813,8 +813,8 @@ def _pvjury_pdf_type( """ Le %s, %s""" % ( - context.get_preference("DirectorTitle", formsemestre_id), - context.get_preference("DirectorName", formsemestre_id), + context.get_preference("DirectorTitle", formsemestre_id) or "", + context.get_preference("DirectorName", formsemestre_id) or "", ), style, )