forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -283,6 +283,13 @@ class ScoExcelSheet:
|
||||
"""
|
||||
self.ws.row_dimensions[cle].hidden = value
|
||||
|
||||
def set_column_dimension_hidden(self, cle, value):
|
||||
"""Masque ou affiche une ligne.
|
||||
cle -- identifie la colonne (1...)
|
||||
value -- boolean (vrai = colonne cachée)
|
||||
"""
|
||||
self.ws.column_dimensions[cle].hidden = value
|
||||
|
||||
def make_cell(self, value: any = None, style=None, comment=None):
|
||||
"""Construit une cellule.
|
||||
value -- contenu de la cellule (texte, numérique, booléen ou date)
|
||||
@ -450,6 +457,8 @@ def excel_feuille_saisie(evaluation: "Evaluation", titreannee, description, line
|
||||
ws.set_column_dimension_width("D", 164.0 / 7) # groupes
|
||||
ws.set_column_dimension_width("E", 115.0 / 7) # notes
|
||||
ws.set_column_dimension_width("F", 355.0 / 7) # remarques
|
||||
ws.set_column_dimension_width("G", 11.0 / 7) # colonne NIP
|
||||
ws.set_column_dimension_hidden("G", True) # colonne NIP cachée
|
||||
|
||||
# fontes
|
||||
font_base = Font(name="Arial", size=12)
|
||||
@ -526,6 +535,7 @@ def excel_feuille_saisie(evaluation: "Evaluation", titreannee, description, line
|
||||
ws.make_cell("Groupe", style_titres),
|
||||
ws.make_cell("Note sur %g" % (evaluation.note_max or 0.0), style_titres),
|
||||
ws.make_cell("Remarque", style_titres),
|
||||
ws.make_cell("NIP", style_titres),
|
||||
]
|
||||
)
|
||||
|
||||
@ -552,6 +562,7 @@ def excel_feuille_saisie(evaluation: "Evaluation", titreannee, description, line
|
||||
ws.make_cell(s, st),
|
||||
ws.make_cell(val, style_notes), # note
|
||||
ws.make_cell(line[6], style_comment), # comment
|
||||
ws.make_cell(line[7], style_ro), # NIP
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -922,13 +922,11 @@ def feuille_saisie_notes(evaluation_id, group_ids=[]):
|
||||
|
||||
# une liste de liste de chaines: lignes de la feuille de calcul
|
||||
rows = []
|
||||
|
||||
etuds = _get_sorted_etuds(evaluation, etudids, formsemestre.id)
|
||||
for e in etuds:
|
||||
etudid = e["etudid"]
|
||||
groups = sco_groups.get_etud_groups(etudid, formsemestre.id)
|
||||
grc = sco_groups.listgroups_abbrev(groups)
|
||||
|
||||
rows.append(
|
||||
[
|
||||
str(etudid),
|
||||
@ -938,6 +936,7 @@ def feuille_saisie_notes(evaluation_id, group_ids=[]):
|
||||
grc,
|
||||
e["val"],
|
||||
e["explanation"],
|
||||
e["code_nip"],
|
||||
]
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user