diff --git a/sco_bulletins_json.py b/sco_bulletins_json.py index 9420398c..4fdfeb8c 100644 --- a/sco_bulletins_json.py +++ b/sco_bulletins_json.py @@ -122,7 +122,9 @@ def formsemestre_bulletinetud_published_dict( nom=quote_xml_attr(etudinfo["nom"]), prenom=quote_xml_attr(etudinfo["prenom"]), sexe=quote_xml_attr(etudinfo["sexe"]), - photo_url=quote_xml_attr(sco_photos.etud_photo_url(context, etudinfo)), + photo_url=quote_xml_attr( + sco_photos.etud_photo_url(context, etudinfo, fast=True) + ), email=quote_xml_attr(etudinfo["email"]), emailperso=quote_xml_attr(etudinfo["emailperso"]), ) diff --git a/sco_photos.py b/sco_photos.py index 72b8e2e5..12d126df 100644 --- a/sco_photos.py +++ b/sco_photos.py @@ -82,11 +82,13 @@ def photo_portal_url(context, etud): return None -def etud_photo_url(context, etud, size="small", REQUEST=None): +def etud_photo_url(context, etud, size="small", fast=False, REQUEST=None): """url to the image of the student, in "small" size or "orig" size. If ScoDoc doesn't have an image and a portal is configured, link to it. """ photo_url = "get_photo_image?etudid=%s&size=%s" % (etud["etudid"], size) + if fast: + return photo_url path = photo_pathname(context, etud, size=size) if not path: # Portail ?