From 2f81ce8ac2049d88807954c80a913dcbad76296f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9o=20BARAS=20=28IUT1=20Grenoble=29?= Date: Tue, 16 Jan 2024 06:35:27 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9liore=20rendu=20visuel=20min/moy/max=20?= =?UTF-8?q?dans=20excel=20:=20None/None/None=20->=20-/-/-?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pe/pe_jurype.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/app/pe/pe_jurype.py b/app/pe/pe_jurype.py index aaaa61b8..cc3a799d 100644 --- a/app/pe/pe_jurype.py +++ b/app/pe/pe_jurype.py @@ -1045,9 +1045,9 @@ class JuryPE(object): rows=[], titles={"pas d'étudiants": "pas d'étudiants"}, html_sortable=True, - xls_sheet_name="dut", + xls_sheet_name="but", ) - sT.add_genTable("dut", T) + sT.add_genTable("but", T) return sT # Si des étudiants @@ -1069,24 +1069,20 @@ class JuryPE(object): # Les aggrégats à afficher par ordre tel que indiqué dans le dictionnaire parcours aggregats = list(JuryPE.PARCOURS.keys()) # ['S1', 'S2', ..., '1A', '4S'] - aggregats = sorted( - aggregats, key=lambda t: JuryPE.PARCOURS[t]["ordre"] - ) # Tri des aggrégats + # aggregats = sorted( + # aggregats, key=lambda t: JuryPE.PARCOURS[t]["ordre"] + # ) # Tri des aggrégats if mode == "multiplesheet": allSheets = ( self.get_allTagInSyntheseJury() ) # tous les tags de syntheseJuryDict allSheets = sorted(allSheets) # Tri des tags par ordre alphabétique - for ( - sem - ) in aggregats: # JuryPE.PARCOURS.keys() -> ['S1', 'S2', ..., '1A', '4S'] + for sem in JuryPE.TOUS_LES_PARCOURS: entete.extend(["%s %s" % (sem, champ) for champ in champs]) else: # "singlesheet" allSheets = ["singlesheet"] - for ( - sem - ) in aggregats: # JuryPE.PARCOURS.keys() -> ['S1', 'S2', ..., '1A', '4S'] + for sem in JuryPE.TOUS_LES_PARCOURS: # JuryPE.PARCOURS.keys() -> ['S1', 'S2', ..., '1A', '4S'] tags = self.get_allTagForAggregat(sem) entete.extend( ["%s %s %s" % (sem, tag, champ) for tag in tags for champ in champs] @@ -1145,19 +1141,21 @@ class JuryPE(object): ) row[champ + "note"] = scu.fmt_note(resgroupe[0]) row[champ + "class groupe"] = "%s / %s" % ( - resgroupe[2], - resgroupe[3], + resgroupe[2] if resgroupe[2] else "-", + resgroupe[3] if resgroupe[3] else "-" ) row[champ + "class promo"] = "%s / %s" % ( - respromo[2], - respromo[3], + respromo[2] if respromo[2] else "-", + respromo[3] if respromo[3] else "-" ) row[champ + "min/moy/max groupe"] = "%s / %s / %s" % tuple( - scu.fmt_note(x) - for x in (resgroupe[6], resgroupe[4], resgroupe[5]) + (scu.fmt_note(x) if x is not None else "-") + for x in (resgroupe[6], + resgroupe[4], + resgroupe[5]) ) row[champ + "min/moy/max promo"] = "%s / %s / %s" % tuple( - scu.fmt_note(x) + (scu.fmt_note(x) if x is not None else "-") for x in (respromo[6], respromo[4], respromo[5]) ) rows.append(row)