forked from ScoDoc/ScoDoc
Fix regression: saisie notes tableur
This commit is contained in:
parent
b7e6783ae7
commit
55cd1e7bba
@ -885,20 +885,12 @@ def feuille_saisie_notes(evaluation_id, group_ids=[]):
|
|||||||
indication_date = evaluation.jour.isoformat()
|
indication_date = evaluation.jour.isoformat()
|
||||||
else:
|
else:
|
||||||
indication_date = scu.sanitize_filename(evaluation.description or "")[:12]
|
indication_date = scu.sanitize_filename(evaluation.description or "")[:12]
|
||||||
eval_name = "%s-%s" % (evaluation.moduleimpl.module.code, indication_date)
|
eval_name = f"{evaluation.moduleimpl.module.code}-{indication_date}"
|
||||||
|
|
||||||
if evaluation.description:
|
date_str = (
|
||||||
evaltitre = "%s du %s" % (
|
f"""du {evaluation.jour.strftime("%d/%m/%Y")}"""
|
||||||
evaluation.description,
|
if evaluation.jour
|
||||||
evaluation.jour.strftime("%d/%m/%Y"),
|
else "(sans date)"
|
||||||
)
|
|
||||||
else:
|
|
||||||
evaltitre = "évaluation du %s" % evaluation.jour.strftime("%d/%m/%Y")
|
|
||||||
description = "%s en %s (%s) resp. %s" % (
|
|
||||||
evaltitre,
|
|
||||||
evaluation.moduleimpl.module.abbrev or "",
|
|
||||||
evaluation.moduleimpl.module.code,
|
|
||||||
mod_responsable["prenomnom"],
|
|
||||||
)
|
)
|
||||||
eval_titre = f"""{evaluation.description if evaluation.description else "évaluation"} {date_str}"""
|
eval_titre = f"""{evaluation.description if evaluation.description else "évaluation"} {date_str}"""
|
||||||
|
|
||||||
@ -949,7 +941,7 @@ def feuille_saisie_notes(evaluation_id, group_ids=[]):
|
|||||||
|
|
||||||
filename = f"notes_{eval_name}_{gr_title_filename}"
|
filename = f"notes_{eval_name}_{gr_title_filename}"
|
||||||
xls = sco_excel.excel_feuille_saisie(
|
xls = sco_excel.excel_feuille_saisie(
|
||||||
evaluation, formsemestre.titre_annee(), description, lines=L
|
evaluation, formsemestre.titre_annee(), description, lines=rows
|
||||||
)
|
)
|
||||||
return scu.send_file(xls, filename, scu.XLSX_SUFFIX, mime=scu.XLSX_MIMETYPE)
|
return scu.send_file(xls, filename, scu.XLSX_SUFFIX, mime=scu.XLSX_MIMETYPE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user