From bb70ef8e388d98d6ae115b7d38d59f1dfb0aa5d8 Mon Sep 17 00:00:00 2001 From: viennet Date: Mon, 4 Jan 2021 11:31:18 +0100 Subject: [PATCH] Fix: trombino Tours --- sco_bulletins_generator.py | 2 +- sco_bulletins_pdf.py | 2 +- sco_moduleimpl_status.py | 1 - sco_pdf.py | 2 +- sco_trombino.py | 4 ++-- sco_trombino_tours.py | 8 ++++++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/sco_bulletins_generator.py b/sco_bulletins_generator.py index 4e09360..717cd9b 100644 --- a/sco_bulletins_generator.py +++ b/sco_bulletins_generator.py @@ -198,7 +198,7 @@ class BulletinGenerator: document.addPageTemplates( ScolarsPageTemplate( document, - self.context, + context=self.context, author="%s %s (E. Viennet) [%s]" % (SCONAME, SCOVERSION, self.description), title="Bulletin %s de %s" diff --git a/sco_bulletins_pdf.py b/sco_bulletins_pdf.py index 56617a5..e01dca0 100644 --- a/sco_bulletins_pdf.py +++ b/sco_bulletins_pdf.py @@ -86,7 +86,7 @@ def pdfassemblebulletins( document.addPageTemplates( ScolarsPageTemplate( document, - context, + context=context, author="%s %s (E. Viennet)" % (SCONAME, SCOVERSION), title="Bulletin %s" % bul_title, subject="Bulletin de note", diff --git a/sco_moduleimpl_status.py b/sco_moduleimpl_status.py index 99f1f86..7a4bf1e 100644 --- a/sco_moduleimpl_status.py +++ b/sco_moduleimpl_status.py @@ -50,7 +50,6 @@ import ZAbsences # menu evaluation dans moduleimpl def moduleimpl_evaluation_menu(context, evaluation_id, nbnotes=0, REQUEST=None): "Menu avec actions sur une evaluation" - authuser = REQUEST.AUTHENTICATED_USER E = context.do_evaluation_list({"evaluation_id": evaluation_id})[0] modimpl = context.do_moduleimpl_list(moduleimpl_id=E["moduleimpl_id"])[0] diff --git a/sco_pdf.py b/sco_pdf.py index 80f72f9..0d14e79 100644 --- a/sco_pdf.py +++ b/sco_pdf.py @@ -300,7 +300,7 @@ def pdf_basic_page( document.addPageTemplates( ScolarsPageTemplate( document, - context, + context=context, title=title, author="%s %s (E. Viennet)" % (SCONAME, SCOVERSION), footer_template="Edité par %(scodoc_name)s le %(day)s/%(month)s/%(year)s à %(hour)sh%(minute)s", diff --git a/sco_trombino.py b/sco_trombino.py index f1a3385..04ffb31 100644 --- a/sco_trombino.py +++ b/sco_trombino.py @@ -366,7 +366,7 @@ def _trombino_pdf(context, groups_infos, REQUEST): document.addPageTemplates( ScolarsPageTemplate( document, - context, + context=context, preferences=context.get_preferences(sem["formsemestre_id"]), ) ) @@ -515,7 +515,7 @@ def _listeappel_photos_pdf(context, groups_infos, REQUEST): document.addPageTemplates( ScolarsPageTemplate( document, - context, + context=context, preferences=context.get_preferences(sem["formsemestre_id"]), ) ) diff --git a/sco_trombino_tours.py b/sco_trombino_tours.py index 6c0e955..eece74e 100644 --- a/sco_trombino_tours.py +++ b/sco_trombino_tours.py @@ -276,7 +276,9 @@ def pdf_trombino_tours( filename = "trombino-%s-%s.pdf" % (DeptName, groups_infos.groups_filename) document = BaseDocTemplate(report) document.addPageTemplates( - ScolarsPageTemplate(document, preferences=context.get_preferences()) + ScolarsPageTemplate( + document, context=context, preferences=context.get_preferences() + ) ) document.build(objects) data = report.getvalue() @@ -468,7 +470,9 @@ def pdf_feuille_releve_absences( else: document = BaseDocTemplate(report, pagesize=taille) document.addPageTemplates( - ScolarsPageTemplate(document, preferences=context.get_preferences()) + ScolarsPageTemplate( + document, context=context, preferences=context.get_preferences() + ) ) document.build(objects) data = report.getvalue()