forked from ScoDoc/DocScoDoc
Améliore présentation formsemestre_description
This commit is contained in:
parent
9656f3f37e
commit
b44cd7a575
@ -295,7 +295,12 @@ associé.
|
|||||||
("matiere_id", {"input_type": "hidden"}),
|
("matiere_id", {"input_type": "hidden"}),
|
||||||
(
|
(
|
||||||
"ue_id",
|
"ue_id",
|
||||||
{"input_type": "menu", "allowed_values": ue_ids, "labels": ue_names},
|
{
|
||||||
|
"input_type": "menu",
|
||||||
|
"allowed_values": ue_ids,
|
||||||
|
"labels": ue_names,
|
||||||
|
"title": "UE",
|
||||||
|
},
|
||||||
),
|
),
|
||||||
("titre", {"size": 30, "explanation": "nom de cette matière"}),
|
("titre", {"size": 30, "explanation": "nom de cette matière"}),
|
||||||
(
|
(
|
||||||
|
@ -594,7 +594,7 @@ def fill_formsemestre(sem):
|
|||||||
|
|
||||||
# Description du semestre sous forme de table exportable
|
# Description du semestre sous forme de table exportable
|
||||||
def formsemestre_description_table(
|
def formsemestre_description_table(
|
||||||
formsemestre_id, with_evals=False, with_parcours=False
|
formsemestre_id: int, with_evals=False, with_parcours=False
|
||||||
):
|
):
|
||||||
"""Description du semestre sous forme de table exportable
|
"""Description du semestre sous forme de table exportable
|
||||||
Liste des modules et de leurs coefficients
|
Liste des modules et de leurs coefficients
|
||||||
@ -658,6 +658,9 @@ def formsemestre_description_table(
|
|||||||
"ects": ects_str,
|
"ects": ects_str,
|
||||||
"Module": ue.titre,
|
"Module": ue.titre,
|
||||||
"_css_row_class": "table_row_ue",
|
"_css_row_class": "table_row_ue",
|
||||||
|
"_UE_td_attrs": f'style="background-color: {ue.color} !important;"'
|
||||||
|
if ue.color
|
||||||
|
else "",
|
||||||
}
|
}
|
||||||
if use_ue_coefs:
|
if use_ue_coefs:
|
||||||
ue_info["Coef."] = ue.coefficient
|
ue_info["Coef."] = ue.coefficient
|
||||||
@ -671,6 +674,7 @@ def formsemestre_description_table(
|
|||||||
|
|
||||||
l = {
|
l = {
|
||||||
"UE": modimpl.module.ue.acronyme,
|
"UE": modimpl.module.ue.acronyme,
|
||||||
|
"_UE_td_attrs": ue_info["_UE_td_attrs"],
|
||||||
"Code": modimpl.module.code or "",
|
"Code": modimpl.module.code or "",
|
||||||
"Module": modimpl.module.abbrev or modimpl.module.titre,
|
"Module": modimpl.module.abbrev or modimpl.module.titre,
|
||||||
"_Module_class": "scotext",
|
"_Module_class": "scotext",
|
||||||
@ -711,6 +715,11 @@ def formsemestre_description_table(
|
|||||||
evals.reverse() # ordre chronologique
|
evals.reverse() # ordre chronologique
|
||||||
# Ajoute etat:
|
# Ajoute etat:
|
||||||
for e in evals:
|
for e in evals:
|
||||||
|
e["UE"] = l["UE"]
|
||||||
|
e["_UE_td_attrs"] = l["_UE_td_attrs"]
|
||||||
|
e["Code"] = l["Code"]
|
||||||
|
e["_css_row_class"] = "evaluation"
|
||||||
|
e["Module"] = "éval."
|
||||||
# Cosmetic: conversions pour affichage
|
# Cosmetic: conversions pour affichage
|
||||||
if e["etat"]["evalcomplete"]:
|
if e["etat"]["evalcomplete"]:
|
||||||
e["evalcomplete_str"] = "Oui"
|
e["evalcomplete_str"] = "Oui"
|
||||||
@ -729,6 +738,8 @@ def formsemestre_description_table(
|
|||||||
evaluation: Evaluation = Evaluation.query.get(e["evaluation_id"])
|
evaluation: Evaluation = Evaluation.query.get(e["evaluation_id"])
|
||||||
for ue_id, poids in evaluation.get_ue_poids_dict().items():
|
for ue_id, poids in evaluation.get_ue_poids_dict().items():
|
||||||
e[f"ue_{ue_id}"] = poids or ""
|
e[f"ue_{ue_id}"] = poids or ""
|
||||||
|
e[f"_ue_{ue_id}_class"] = "poids"
|
||||||
|
e[f"_ue_{ue_id}_help"] = "poids vers l'UE"
|
||||||
|
|
||||||
R += evals
|
R += evals
|
||||||
|
|
||||||
@ -1150,7 +1161,12 @@ _TABLEAU_MODULES_FOOT = """</table>"""
|
|||||||
|
|
||||||
|
|
||||||
def formsemestre_tableau_modules(
|
def formsemestre_tableau_modules(
|
||||||
modimpls, nt, formsemestre_id, can_edit=True, show_ues=True, use_ue_coefs=False
|
modimpls: list[dict],
|
||||||
|
nt,
|
||||||
|
formsemestre_id: int,
|
||||||
|
can_edit=True,
|
||||||
|
show_ues=True,
|
||||||
|
use_ue_coefs=False,
|
||||||
) -> str:
|
) -> str:
|
||||||
"Lignes table HTML avec modules du semestre"
|
"Lignes table HTML avec modules du semestre"
|
||||||
H = []
|
H = []
|
||||||
@ -1228,19 +1244,21 @@ def formsemestre_tableau_modules(
|
|||||||
title="{mod_descr}" class="stdlink">{mod.code}</a></td>"""
|
title="{mod_descr}" class="stdlink">{mod.code}</a></td>"""
|
||||||
)
|
)
|
||||||
H.append(
|
H.append(
|
||||||
'<td class="scotext"><a href="moduleimpl_status?moduleimpl_id=%s" title="%s" class="formsemestre_status_link">%s</a></td>'
|
f"""<td class="scotext"><a href="{
|
||||||
% (modimpl["moduleimpl_id"], mod_descr, mod.abbrev or mod.titre or "")
|
url_for( "notes.moduleimpl_status",
|
||||||
|
scodoc_dept=g.scodoc_dept, moduleimpl_id=modimpl["moduleimpl_id"]
|
||||||
|
) }" title="{mod_descr}" class="formsemestre_status_link">{mod.abbrev or mod.titre or ""}</a>
|
||||||
|
</td>
|
||||||
|
<td class="formsemestre_status_inscrits">{len(mod_inscrits)}</td>
|
||||||
|
<td class="resp scotext">
|
||||||
|
<a class="discretelink" href="{
|
||||||
|
url_for("notes.moduleimpl_status",
|
||||||
|
scodoc_dept=g.scodoc_dept, moduleimpl_id=modimpl["moduleimpl_id"]
|
||||||
|
) }" title="{mod_ens}">{ sco_users.user_info(modimpl["responsable_id"])["prenomnom"] }</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
H.append('<td class="formsemestre_status_inscrits">%s</td>' % len(mod_inscrits))
|
|
||||||
H.append(
|
|
||||||
'<td class="resp scotext"><a class="discretelink" href="moduleimpl_status?moduleimpl_id=%s" title="%s">%s</a></td>'
|
|
||||||
% (
|
|
||||||
modimpl["moduleimpl_id"],
|
|
||||||
mod_ens,
|
|
||||||
sco_users.user_info(modimpl["responsable_id"])["prenomnom"],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
H.append("<td>")
|
|
||||||
if mod.module_type in (ModuleType.RESSOURCE, ModuleType.SAE):
|
if mod.module_type in (ModuleType.RESSOURCE, ModuleType.SAE):
|
||||||
coefs = mod.ue_coefs_list()
|
coefs = mod.ue_coefs_list()
|
||||||
H.append(f'<a class="invisible_link" href="#" title="{mod_descr}">')
|
H.append(f'<a class="invisible_link" href="#" title="{mod_descr}">')
|
||||||
|
@ -3281,6 +3281,20 @@ table.formsemestre_description tr.table_row_ue td {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.formsemestre_description tr.evaluation td {
|
||||||
|
color: rgb(4, 16, 159);
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.formsemestre_description tr.evaluation td.poids a {
|
||||||
|
font-style: italic;
|
||||||
|
color: rgb(4, 16, 159);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.formsemestre_description tbody tr.evaluation td {
|
||||||
|
background-color: #cee4fa !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* --- */
|
/* --- */
|
||||||
tr#tf_extue_decl>td,
|
tr#tf_extue_decl>td,
|
||||||
tr#tf_extue_note>td {
|
tr#tf_extue_note>td {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.3.41"
|
SCOVERSION = "9.3.42"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user