From 295ff983a155d98e3d537270bb00f4c7f40410e5 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 3 May 2021 11:45:00 +0200 Subject: [PATCH] getEtudInfo: add format arg --- ZScolar.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ZScolar.py b/ZScolar.py index ad167296..687520b8 100644 --- a/ZScolar.py +++ b/ZScolar.py @@ -780,7 +780,7 @@ REQUEST.URL0=%s
# -------------------------- INFOS SUR ETUDIANTS -------------------------- security.declareProtected(ScoView, "getEtudInfo") - def getEtudInfo(self, etudid=False, code_nip=False, filled=False, REQUEST=None): + def getEtudInfo(self, etudid=False, code_nip=False, filled=False, REQUEST=None, format=None): """infos sur un etudiant pour utilisation en Zope DTML On peut specifier etudid ou bien cherche dans REQUEST.form: etudid, code_nip, code_ine @@ -791,9 +791,13 @@ REQUEST.URL0=%s
cnx = self.GetDBConnexion() args = make_etud_args(etudid=etudid, code_nip=code_nip, REQUEST=REQUEST) etud = scolars.etudident_list(cnx, args=args) + if filled: self.fillEtudsInfo(etud) - return etud + if format is None: + return etud + else: + return scu.sendResult(REQUEST, etud, name="etud", format=format) security.declareProtected(ScoView, "search_etud_in_dept") search_etud_in_dept = sco_find_etud.search_etud_in_dept