Tableau bord semestre: avertissement modules non conformes
This commit is contained in:
parent
624ea39edd
commit
7c794c01d1
@ -1173,7 +1173,8 @@ def formsemestre_tableau_modules(
|
||||
moduleimpl_id=modimpl.id,
|
||||
)
|
||||
mod_descr = "Module " + (mod.titre or "")
|
||||
if mod.is_apc():
|
||||
is_apc = mod.is_apc() # SAE ou ressource
|
||||
if is_apc:
|
||||
coef_descr = ", ".join(
|
||||
[
|
||||
f"{ue.acronyme}: {co}"
|
||||
@ -1193,6 +1194,7 @@ def formsemestre_tableau_modules(
|
||||
[u.get_nomcomplet() for u in modimpl.enseignants]
|
||||
)
|
||||
mod_nb_inscrits = nt.modimpls_results[modimpl.id].nb_inscrits_module
|
||||
mod_is_conforme = modimpl.check_apc_conformity(nt)
|
||||
ue = modimpl.module.ue
|
||||
if show_ues and (prev_ue_id != ue.id):
|
||||
prev_ue_id = ue.id
|
||||
@ -1200,10 +1202,12 @@ def formsemestre_tableau_modules(
|
||||
if use_ue_coefs:
|
||||
titre += f""" <b>(coef. {ue.coefficient or 0.0})</b>"""
|
||||
H.append(
|
||||
f"""<tr class="formsemestre_status_ue"><td colspan="4">
|
||||
f"""<tr class="formsemestre_status_ue">
|
||||
<td colspan="4">
|
||||
<span class="status_ue_acro">{ue.acronyme}</span>
|
||||
<span class="status_ue_title">{titre}</span>
|
||||
</td><td colspan="2">"""
|
||||
</td>
|
||||
<td colspan="2">"""
|
||||
)
|
||||
|
||||
expr = sco_compute_moy.get_ue_expression(
|
||||
@ -1226,21 +1230,23 @@ def formsemestre_tableau_modules(
|
||||
fontorange = ""
|
||||
|
||||
etat = sco_evaluations.do_evaluation_etat_in_mod(nt, modimpl)
|
||||
# if nt.parcours.APC_SAE:
|
||||
# tbd style si module non conforme
|
||||
if (
|
||||
etat["nb_evals_completes"] > 0
|
||||
and etat["nb_evals_en_cours"] == 0
|
||||
and etat["nb_evals_vides"] == 0
|
||||
and not etat["attente"]
|
||||
):
|
||||
H.append(f'<tr class="formsemestre_status_green{fontorange}">')
|
||||
tr_classes = f"formsemestre_status_green{fontorange}"
|
||||
else:
|
||||
H.append(f'<tr class="formsemestre_status{fontorange}">')
|
||||
|
||||
tr_classes = f"formsemestre_status{fontorange}"
|
||||
if etat["attente"]:
|
||||
tr_classes += " modimpl_attente"
|
||||
if not mod_is_conforme:
|
||||
tr_classes += " modimpl_non_conforme"
|
||||
H.append(
|
||||
f"""
|
||||
<td class="formsemestre_status_code""><a
|
||||
<tr class="{tr_classes}">
|
||||
<td class="formsemestre_status_code"><a
|
||||
href="{moduleimpl_status_url}"
|
||||
title="{mod_descr}" class="stdlink">{mod.code}</a></td>
|
||||
<td class="scotext"><a href="{moduleimpl_status_url}" title="{mod_descr}"
|
||||
@ -1302,6 +1308,11 @@ def formsemestre_tableau_modules(
|
||||
f""" <span><a class="redlink" href="{moduleimpl_status_url}"
|
||||
title="Il y a des notes en attente">[en attente]</a></span>"""
|
||||
)
|
||||
if not mod_is_conforme:
|
||||
H.append(
|
||||
f""" <span><a class="redlink" href="{moduleimpl_status_url}"
|
||||
title="évaluations non conformes">[non conforme]</a></span>"""
|
||||
)
|
||||
elif mod.module_type == ModuleType.MALUS:
|
||||
nb_malus_notes = sum(
|
||||
e["etat"]["nb_notes"] for e in nt.get_mod_evaluation_etat_list(modimpl)
|
||||
|
@ -1801,11 +1801,27 @@ table.formsemestre_status {
|
||||
tr.formsemestre_status {
|
||||
background-color: rgb(90%, 90%, 90%);
|
||||
}
|
||||
|
||||
table.formsemestre_status tr td:first-child {
|
||||
padding-left: 4px;
|
||||
}
|
||||
table.formsemestre_status tr td:last-child {
|
||||
padding-right: 8px;
|
||||
}
|
||||
tr.formsemestre_status_green {
|
||||
background-color: #eff7f2;
|
||||
}
|
||||
|
||||
tr.modimpl_non_conforme td {
|
||||
background-color: #ffc458;
|
||||
}
|
||||
tr.modimpl_non_conforme td, tr.modimpl_attente td {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
table.formsemestre_status a.redlink {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
tr.formsemestre_status_ue {
|
||||
background-color: rgb(90%, 90%, 90%);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user