forked from ScoDoc/ScoDoc
getEtudInfo: add format arg
This commit is contained in:
parent
cf523e89b4
commit
295ff983a1
@ -780,7 +780,7 @@ REQUEST.URL0=%s<br/>
|
||||
# -------------------------- 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<br/>
|
||||
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)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user