Fix: content-type of page with SVG graph

This commit is contained in:
Emmanuel Viennet 2021-06-26 09:34:49 +02:00
parent 9c84f2d029
commit 0ca363738e

View File

@ -708,14 +708,16 @@ def formsemestre_suivi_cohorte(
return t return t
base_url = REQUEST.URL0 base_url = REQUEST.URL0
burl = ( burl = "%s?formsemestre_id=%s&bac=%s&bacspecialite=%s&civilite=%s&statut=%s" % (
"%s?formsemestre_id=%s&bac=%s&bacspecialite=%s&civilite=%s&statut=%s" base_url,
% (base_url, formsemestre_id, bac, bacspecialite, civilite, statut) formsemestre_id,
bac,
bacspecialite,
civilite,
statut,
) )
if percent: if percent:
pplink = ( pplink = '<p><a href="%s&percent=0">Afficher les résultats bruts</a></p>' % burl
'<p><a href="%s&percent=0">Afficher les résultats bruts</a></p>' % burl
)
else: else:
pplink = ( pplink = (
'<p><a href="%s&percent=1">Afficher les résultats en pourcentages</a></p>' '<p><a href="%s&percent=1">Afficher les résultats en pourcentages</a></p>'
@ -1571,7 +1573,6 @@ def formsemestre_graph_parcours(
% MAX_ETUD_IN_DESCR, % MAX_ETUD_IN_DESCR,
context.sco_footer(REQUEST), context.sco_footer(REQUEST),
] ]
REQUEST.RESPONSE.setHeader("content-type", "application/xhtml+xml")
return "\n".join(H) return "\n".join(H)
else: else:
raise ValueError("invalid format: %s" % format) raise ValueError("invalid format: %s" % format)