forked from ScoDoc/ScoDoc
Liste notes: mise en évidence évals incomplètes
This commit is contained in:
parent
bee87cf58b
commit
fe69aec8d6
@ -575,9 +575,7 @@ def _make_table_notes(
|
||||
html_sortable=True,
|
||||
base_url=base_url,
|
||||
filename=filename,
|
||||
origin="Généré par %s le " % sco_version.SCONAME
|
||||
+ scu.timedate_human_repr()
|
||||
+ "",
|
||||
origin=f"Généré par {sco_version.SCONAME} le {scu.timedate_human_repr()}",
|
||||
caption=caption,
|
||||
html_next_section=html_next_section,
|
||||
page_title="Notes de " + sem["titremois"],
|
||||
@ -674,6 +672,21 @@ def _add_eval_columns(
|
||||
e_o = Evaluation.query.get(evaluation_id) # XXX en attendant ré-écriture
|
||||
inscrits = e_o.moduleimpl.formsemestre.etudids_actifs # set d'etudids
|
||||
notes_db = sco_evaluation_db.do_evaluation_get_all_notes(evaluation_id)
|
||||
|
||||
if len(e["jour"]) > 0:
|
||||
titles[evaluation_id] = "%(description)s (%(jour)s)" % e
|
||||
else:
|
||||
titles[evaluation_id] = "%(description)s " % e
|
||||
|
||||
if e["eval_state"]["evalcomplete"]:
|
||||
klass = "eval_complete"
|
||||
elif e["eval_state"]["evalattente"]:
|
||||
klass = "eval_attente"
|
||||
else:
|
||||
klass = "eval_incomplete"
|
||||
titles[evaluation_id] += " (non prise en compte)"
|
||||
titles[f"_{evaluation_id}_td_attrs"] = f'class="{klass}"'
|
||||
|
||||
for row in rows:
|
||||
etudid = row["etudid"]
|
||||
if etudid in notes_db:
|
||||
@ -713,9 +726,11 @@ def _add_eval_columns(
|
||||
val = None
|
||||
|
||||
if val is None:
|
||||
row["_" + str(evaluation_id) + "_td_attrs"] = 'class="etudabs" '
|
||||
row[f"_{evaluation_id}_td_attrs"] = f'class="etudabs {klass}" '
|
||||
if not row.get("_css_row_class", ""):
|
||||
row["_css_row_class"] = "etudabs"
|
||||
else:
|
||||
row[f"_{evaluation_id}_td_attrs"] = f'class="{klass}" '
|
||||
# regroupe les commentaires
|
||||
if explanation:
|
||||
if explanation in K:
|
||||
@ -768,18 +783,6 @@ def _add_eval_columns(
|
||||
else:
|
||||
row_moys[evaluation_id] = ""
|
||||
|
||||
if len(e["jour"]) > 0:
|
||||
titles[evaluation_id] = "%(description)s (%(jour)s)" % e
|
||||
else:
|
||||
titles[evaluation_id] = "%(description)s " % e
|
||||
|
||||
if e["eval_state"]["evalcomplete"]:
|
||||
titles["_" + str(evaluation_id) + "_td_attrs"] = 'class="eval_complete"'
|
||||
elif e["eval_state"]["evalattente"]:
|
||||
titles["_" + str(evaluation_id) + "_td_attrs"] = 'class="eval_attente"'
|
||||
else:
|
||||
titles["_" + str(evaluation_id) + "_td_attrs"] = 'class="eval_incomplete"'
|
||||
|
||||
return notes, nb_abs, nb_att # pour histogramme
|
||||
|
||||
|
||||
|
@ -1089,11 +1089,18 @@ table.notes_evaluation th.eval_complete {
|
||||
|
||||
table.notes_evaluation th.eval_incomplete {
|
||||
color: red;
|
||||
width: 80px;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
table.notes_evaluation td.eval_incomplete>a {
|
||||
font-size: 80%;
|
||||
color: rgb(166, 50, 159);
|
||||
}
|
||||
|
||||
table.notes_evaluation th.eval_attente {
|
||||
color: rgb(215, 90, 0);
|
||||
;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
table.notes_evaluation tr td a.discretelink:hover {
|
||||
|
Loading…
Reference in New Issue
Block a user