disable photo copying when accessing bulletins

This commit is contained in:
viennet 2020-12-12 18:15:29 +01:00
parent 72d126c04d
commit 1c718dffde
2 changed files with 6 additions and 2 deletions

View File

@ -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"]),
)

View File

@ -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 ?