forked from ScoDoc/ScoDoc
disable photo copying when accessing bulletins
This commit is contained in:
parent
72d126c04d
commit
1c718dffde
@ -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"]),
|
||||
)
|
||||
|
@ -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 ?
|
||||
|
Loading…
Reference in New Issue
Block a user