From 4b63fe81e437601132e4b2b748222946792bf775 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 5 Jan 2022 01:03:25 +0100 Subject: [PATCH] fix: het sort --- app/scodoc/sco_report.py | 18 +++++++----------- app/scodoc/sco_utils.py | 5 +++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/scodoc/sco_report.py b/app/scodoc/sco_report.py index d480679b7..6c2582ef1 100644 --- a/app/scodoc/sco_report.py +++ b/app/scodoc/sco_report.py @@ -49,16 +49,12 @@ from app.scodoc import sco_etud from app.scodoc import sco_excel from app.scodoc import sco_formsemestre from app.scodoc import sco_formsemestre_inscriptions -from app.scodoc import sco_formsemestre_status from app.scodoc import sco_parcours_dut -from app.scodoc import sco_pdf from app.scodoc import sco_preferences import sco_version from app.scodoc.gen_tables import GenTable from app import log from app.scodoc.sco_codes_parcours import code_semestre_validant -from app.scodoc.sco_exceptions import ScoValueError -from app.scodoc.sco_pdf import SU MAX_ETUD_IN_DESCR = 20 @@ -121,9 +117,9 @@ def _categories_and_results(etuds, category, result): categories[etud[category]] = True results[etud[result]] = True categories = list(categories.keys()) - categories.sort() + categories.sort(key=scu.heterogeneous_sorting_key) results = list(results.keys()) - results.sort() + results.sort(key=scu.heterogeneous_sorting_key) return categories, results @@ -166,7 +162,7 @@ def _results_by_category( l["sumpercent"] = "%2.1f%%" % ((100.0 * l["sum"]) / tot) # codes = list(results.keys()) - codes.sort() + codes.sort(key=scu.heterogeneous_sorting_key) bottom_titles = [] if C: # ligne du bas avec totaux: @@ -314,7 +310,7 @@ def formsemestre_report_counts( "type_admission", "boursier_prec", ] - keys.sort() + keys.sort(key=scu.heterogeneous_sorting_key) F = [ """

Colonnes: