forked from ScoDoc/ScoDoc
Améliore rendu visuel min/moy/max dans excel : None/None/None -> -/-/-
This commit is contained in:
parent
898270d2f0
commit
2f81ce8ac2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user