From 21d9655655fe1b007df09e4f01573cb7d77cd271 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 9 May 2022 18:32:54 +0200 Subject: [PATCH] Export recap complet en excel brut --- app/scodoc/sco_recapcomplet.py | 10 +++++++--- sco_version.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_recapcomplet.py b/app/scodoc/sco_recapcomplet.py index 179014cfa..6a22c1953 100644 --- a/app/scodoc/sco_recapcomplet.py +++ b/app/scodoc/sco_recapcomplet.py @@ -84,12 +84,15 @@ def formsemestre_recapcomplet( selected_etudid: etudid sélectionné (pour scroller au bon endroit) """ formsemestre = FormSemestre.query.get_or_404(formsemestre_id) - + file_formats = {"csv", "json", "xls", "xlsx", "xlsall", "xml"} + supported_formats = file_formats | {"html"} + if tabformat not in supported_formats: + raise ScoValueError(f"Format non supporté: {tabformat}") + is_file = tabformat in file_formats modejury = int(modejury) - xml_with_decisions = int(xml_with_decisions) force_publishing = int(force_publishing) - is_file = tabformat in {"csv", "json", "xls", "xlsx", "xlsall", "xml"} + data = _do_formsemestre_recapcomplet( formsemestre_id, format=tabformat, @@ -128,6 +131,7 @@ def formsemestre_recapcomplet( for (format, label) in ( ("html", "Tableau"), ("evals", "Avec toutes les évaluations"), + ("xlsx", "Excel non formatté"), ("xml", "Bulletins XML (obsolète)"), ("json", "Bulletins JSON"), ): diff --git a/sco_version.py b/sco_version.py index fe5771ed7..8c3e5f8bd 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.2.17" +SCOVERSION = "9.2.18" SCONAME = "ScoDoc"