bordereau (contrib Pascal B.).
This commit is contained in:
commit
7d5160bb83
@ -652,12 +652,17 @@ def evaluation_describe(evaluation_id="", edit_in_place=True):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# date et absences (pas pour evals de malus)
|
# date et absences (pas pour evals de malus)
|
||||||
jour = E["jour"] or "<em>pas de date</em>"
|
|
||||||
H.append(
|
|
||||||
"<p>Réalisée le <b>%s</b> de %s à %s "
|
|
||||||
% (jour, E["heure_debut"], E["heure_fin"])
|
|
||||||
)
|
|
||||||
if E["jour"]:
|
if E["jour"]:
|
||||||
|
jour = E["jour"]
|
||||||
|
H.append(
|
||||||
|
"<p>Réalisée le <b>%s</b> "
|
||||||
|
% (jour)
|
||||||
|
)
|
||||||
|
if E["heure_debut"] != E["heure_fin"]:
|
||||||
|
H.append(
|
||||||
|
"de %s à %s "
|
||||||
|
% (E["heure_debut"], E["heure_fin"])
|
||||||
|
)
|
||||||
group_id = sco_groups.get_default_group(formsemestre_id)
|
group_id = sco_groups.get_default_group(formsemestre_id)
|
||||||
H.append(
|
H.append(
|
||||||
f"""<span class="noprint"><a href="{url_for(
|
f"""<span class="noprint"><a href="{url_for(
|
||||||
@ -668,6 +673,13 @@ def evaluation_describe(evaluation_id="", edit_in_place=True):
|
|||||||
)
|
)
|
||||||
}">(absences ce jour)</a></span>"""
|
}">(absences ce jour)</a></span>"""
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
jour = "<em>pas de date</em>"
|
||||||
|
H.append(
|
||||||
|
"<p>Réalisée le <b>%s</b> "
|
||||||
|
% (jour)
|
||||||
|
)
|
||||||
|
|
||||||
H.append(
|
H.append(
|
||||||
'</p><p>Coefficient dans le module: <b>%s</b>, notes sur <span id="eval_note_max">%g</span> '
|
'</p><p>Coefficient dans le module: <b>%s</b>, notes sur <span id="eval_note_max">%g</span> '
|
||||||
% (E["coefficient"], E["note_max"])
|
% (E["coefficient"], E["note_max"])
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -273,8 +273,8 @@ def _make_table_notes(
|
|||||||
"expl_key": "Rem.",
|
"expl_key": "Rem.",
|
||||||
"email": "e-mail",
|
"email": "e-mail",
|
||||||
"emailperso": "e-mail perso",
|
"emailperso": "e-mail perso",
|
||||||
|
"signatures": "Signatures",
|
||||||
}
|
}
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
|
|
||||||
class KeyManager(dict): # comment : key (pour regrouper les comments a la fin)
|
class KeyManager(dict): # comment : key (pour regrouper les comments a la fin)
|
||||||
@ -437,7 +437,7 @@ def _make_table_notes(
|
|||||||
if with_emails:
|
if with_emails:
|
||||||
columns_ids += ["email", "emailperso"]
|
columns_ids += ["email", "emailperso"]
|
||||||
# Ajoute lignes en tête et moyennes
|
# Ajoute lignes en tête et moyennes
|
||||||
if len(evals) > 0:
|
if len(evals) > 0 and format != "bordereau":
|
||||||
rows_head = [row_coefs]
|
rows_head = [row_coefs]
|
||||||
if is_apc:
|
if is_apc:
|
||||||
rows_head.append(row_poids)
|
rows_head.append(row_poids)
|
||||||
@ -465,6 +465,8 @@ def _make_table_notes(
|
|||||||
columns_ids.append("expl_key")
|
columns_ids.append("expl_key")
|
||||||
elif format == "xls" or format == "xml":
|
elif format == "xls" or format == "xml":
|
||||||
columns_ids.append("comment")
|
columns_ids.append("comment")
|
||||||
|
elif format == "bordereau":
|
||||||
|
columns_ids.append("signatures")
|
||||||
|
|
||||||
# titres divers:
|
# titres divers:
|
||||||
gl = "".join(["&group_ids%3Alist=" + str(g) for g in group_ids])
|
gl = "".join(["&group_ids%3Alist=" + str(g) for g in group_ids])
|
||||||
@ -480,11 +482,38 @@ def _make_table_notes(
|
|||||||
evalname = "%s-%s" % (module.code, ndb.DateDMYtoISO(E["jour"]))
|
evalname = "%s-%s" % (module.code, ndb.DateDMYtoISO(E["jour"]))
|
||||||
hh = "%s, %s (%d étudiants)" % (E["description"], gr_title, len(etudid_etats))
|
hh = "%s, %s (%d étudiants)" % (E["description"], gr_title, len(etudid_etats))
|
||||||
filename = scu.make_filename("notes_%s_%s" % (evalname, gr_title_filename))
|
filename = scu.make_filename("notes_%s_%s" % (evalname, gr_title_filename))
|
||||||
caption = hh
|
|
||||||
if len(e["jour"]) > 0:
|
if format == "bordereau":
|
||||||
pdf_title = "%(description)s (%(jour)s)" % e
|
hh = " %d étudiants" % (len(etudid_etats))
|
||||||
|
hh += " %d absent" % (nb_abs)
|
||||||
|
if nb_abs > 1:
|
||||||
|
hh += "s"
|
||||||
|
hh += ", %d en attente." % (nb_att)
|
||||||
|
|
||||||
|
pdf_title = "<br/> BORDEREAU DE SIGNATURES"
|
||||||
|
pdf_title += "<br/><br/>%(titre)s" % sem
|
||||||
|
pdf_title += "<br/>(%(mois_debut)s - %(mois_fin)s)" % sem
|
||||||
|
pdf_title += " semestre %s %s" % (
|
||||||
|
sem["semestre_id"],
|
||||||
|
sem.get("modalite", ""),
|
||||||
|
)
|
||||||
|
pdf_title += f"<br/>Notes du module {module.code} - {module.titre}"
|
||||||
|
pdf_title += "<br/>Evaluation : %(description)s " % e
|
||||||
|
if len(e["jour"]) > 0:
|
||||||
|
pdf_title += " (%(jour)s)" % e
|
||||||
|
pdf_title += "(noté sur %(note_max)s )<br/><br/>" % e
|
||||||
else:
|
else:
|
||||||
pdf_title = "%(description)s " % e
|
hh = " %s, %s (%d étudiants)" % (
|
||||||
|
E["description"],
|
||||||
|
gr_title,
|
||||||
|
len(etudid_etats),
|
||||||
|
)
|
||||||
|
if len(e["jour"]) > 0:
|
||||||
|
pdf_title = "%(description)s (%(jour)s)" % e
|
||||||
|
else:
|
||||||
|
pdf_title = "%(description)s " % e
|
||||||
|
|
||||||
|
caption = hh
|
||||||
html_title = ""
|
html_title = ""
|
||||||
base_url = "evaluation_listenotes?evaluation_id=%s" % E["evaluation_id"] + gl
|
base_url = "evaluation_listenotes?evaluation_id=%s" % E["evaluation_id"] + gl
|
||||||
html_next_section = (
|
html_next_section = (
|
||||||
@ -499,7 +528,7 @@ def _make_table_notes(
|
|||||||
title += " %s" % gr_title
|
title += " %s" % gr_title
|
||||||
caption = title
|
caption = title
|
||||||
html_next_section = ""
|
html_next_section = ""
|
||||||
if format == "pdf":
|
if format == "pdf" or format == "bordereau":
|
||||||
caption = "" # same as pdf_title
|
caption = "" # same as pdf_title
|
||||||
pdf_title = title
|
pdf_title = title
|
||||||
html_title = f"""<h2 class="formsemestre">Notes {module.type_name()} <a href="{
|
html_title = f"""<h2 class="formsemestre">Notes {module.type_name()} <a href="{
|
||||||
@ -528,7 +557,8 @@ def _make_table_notes(
|
|||||||
preferences=sco_preferences.SemPreferences(modimpl["formsemestre_id"]),
|
preferences=sco_preferences.SemPreferences(modimpl["formsemestre_id"]),
|
||||||
# html_generate_cells=False # la derniere ligne (moyennes) est incomplete
|
# html_generate_cells=False # la derniere ligne (moyennes) est incomplete
|
||||||
)
|
)
|
||||||
|
if format == "bordereau":
|
||||||
|
format = "pdf"
|
||||||
t = tab.make_page(format=format, with_html_headers=False)
|
t = tab.make_page(format=format, with_html_headers=False)
|
||||||
if format != "html":
|
if format != "html":
|
||||||
return t
|
return t
|
||||||
@ -548,6 +578,7 @@ def _make_table_notes(
|
|||||||
histo = histogram_notes(notes)
|
histo = histogram_notes(notes)
|
||||||
# 2 colonnes: histo, comments
|
# 2 colonnes: histo, comments
|
||||||
C = [
|
C = [
|
||||||
|
f'<br><a class="stdlink" href="{base_url}&format=bordereau">Bordereau de Signatures (version PDF)</a>',
|
||||||
"<table><tr><td><div><h4>Répartition des notes:</h4>"
|
"<table><tr><td><div><h4>Répartition des notes:</h4>"
|
||||||
+ histo
|
+ histo
|
||||||
+ "</div></td>\n",
|
+ "</div></td>\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user