diff --git a/app/scodoc/sco_archives_etud.py b/app/scodoc/sco_archives_etud.py index 0ea44268c4..f9a70f2d45 100644 --- a/app/scodoc/sco_archives_etud.py +++ b/app/scodoc/sco_archives_etud.py @@ -272,7 +272,6 @@ def etudarchive_generate_excel_sample(group_id=None, REQUEST=None): suffix=scu.XLSX_SUFFIX, mime=scu.XLSX_MIMETYPE, ) - # return sco_excel.send_excel_file(REQUEST, data, "ImportFichiersEtudiants" + scu.XLSX_SUFFIX) def etudarchive_import_files_form(group_id, REQUEST=None): diff --git a/app/scodoc/sco_groups_view.py b/app/scodoc/sco_groups_view.py index f4a4d9ebf9..ebab7ec668 100644 --- a/app/scodoc/sco_groups_view.py +++ b/app/scodoc/sco_groups_view.py @@ -786,7 +786,7 @@ def groups_table( L = [dicttakestr(m, keys) for m in groups_infos.members] title = "etudiants_%s" % groups_infos.groups_filename xls = sco_excel.excel_simple_table(titles=titles, lines=L, sheet_name=title) - filename = title + scu.XLSX_SUFFIX + filename = title return scu.send_file(xls, filename, scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE) else: raise ValueError("unsupported format") diff --git a/app/scodoc/sco_prepajury.py b/app/scodoc/sco_prepajury.py index 4cee940926..084e311c73 100644 --- a/app/scodoc/sco_prepajury.py +++ b/app/scodoc/sco_prepajury.py @@ -328,7 +328,7 @@ def feuille_preparation_jury(formsemestre_id, REQUEST): xls = ws.generate() return scu.send_file( xls, - f"PrepaJury{sn}{scu.XLSX_SUFFIX}", + f"PrepaJury{sn}", scu.XLSX_SUFFIX, mime=scu.XLSX_MIMETYPE, ) diff --git a/app/scodoc/sco_recapcomplet.py b/app/scodoc/sco_recapcomplet.py index 9780821ef8..b788702f2e 100644 --- a/app/scodoc/sco_recapcomplet.py +++ b/app/scodoc/sco_recapcomplet.py @@ -231,7 +231,7 @@ def do_formsemestre_recapcomplet( return data elif format == "csv": return scu.send_file(data, filename=filename, mime=scu.CSV_MIMETYPE) - elif format[:3] == "xls" or format[:3] == "xlsx": + elif format[:3] == "xls" or format[:4] == "xlsx": return scu.send_file(data, filename=filename, mime=scu.XLSX_MIMETYPE) elif format == "json": js = json.dumps(data, indent=1, cls=scu.ScoDocJSONEncoder)