forked from ScoDoc/ScoDoc
Calcul des etuds d'un modimpl avec notes en ATT. Affichage sur tableau bord. Fix tri liste etuds (#595).
This commit is contained in:
parent
6809f24cee
commit
5d77d415a2
@ -190,9 +190,14 @@ def moduleimpl_status(moduleimpl_id=None, partition_id=None):
|
||||
if not isinstance(moduleimpl_id, int):
|
||||
raise ScoInvalidIdType("moduleimpl_id must be an integer !")
|
||||
modimpl: ModuleImpl = ModuleImpl.query.get_or_404(moduleimpl_id)
|
||||
module: Module = modimpl.module
|
||||
mi_dict = modimpl.to_dict()
|
||||
formsemestre_id = modimpl.formsemestre_id
|
||||
formsemestre: FormSemestre = modimpl.formsemestre
|
||||
mod_dict = sco_edit_module.module_list(args={"module_id": modimpl.module_id})[0]
|
||||
sem = sco_formsemestre.get_formsemestre(formsemestre_id)
|
||||
formation_dict = sco_formations.formation_list(
|
||||
args={"formation_id": sem["formation_id"]}
|
||||
)[0]
|
||||
mod_inscrits = sco_moduleimpl.do_moduleimpl_inscription_list(
|
||||
moduleimpl_id=moduleimpl_id
|
||||
)
|
||||
@ -227,22 +232,22 @@ def moduleimpl_status(moduleimpl_id=None, partition_id=None):
|
||||
arrow_up, arrow_down, arrow_none = sco_groups.get_arrow_icons_tags()
|
||||
#
|
||||
module_resp = User.query.get(modimpl.responsable_id)
|
||||
mod_type_name = scu.MODULE_TYPE_NAMES[module.module_type]
|
||||
mod_type_name = scu.MODULE_TYPE_NAMES[mod_dict["module_type"]]
|
||||
H = [
|
||||
html_sco_header.sco_header(
|
||||
page_title=f"{mod_type_name} {module.code} {module.titre}",
|
||||
page_title=f"{mod_type_name} {mod_dict['code']} {mod_dict['titre']}",
|
||||
javascripts=["js/etud_info.js"],
|
||||
init_qtip=True,
|
||||
),
|
||||
f"""<h2 class="formsemestre">{mod_type_name}
|
||||
<tt>{module.code}</tt> {module.titre}
|
||||
{"dans l'UE " + modimpl.module.ue.acronyme
|
||||
if modimpl.module.module_type == scu.ModuleType.MALUS
|
||||
f"""<h2 class="formsemestre">{mod_type_name}
|
||||
<tt>{mod_dict['code']}</tt> {mod_dict['titre']}
|
||||
{"dans l'UE " + modimpl.module.ue.acronyme
|
||||
if modimpl.module.module_type == scu.ModuleType.MALUS
|
||||
else ""
|
||||
}
|
||||
</h2>
|
||||
<div class="moduleimpl_tableaubord moduleimpl_type_{
|
||||
scu.ModuleType(module.module_type).name.lower()}">
|
||||
scu.ModuleType(mod_dict['module_type']).name.lower()}">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="fichetitre2">Responsable: </td><td class="redboldtext">
|
||||
@ -289,10 +294,8 @@ def moduleimpl_status(moduleimpl_id=None, partition_id=None):
|
||||
H.append("""</td><td></td></tr>""")
|
||||
# 3ieme ligne: Formation
|
||||
H.append(
|
||||
f"""<tr>
|
||||
<td class="fichetitre2">Formation: </td><td>{formsemestre.formation.titre}</td>
|
||||
</tr>
|
||||
"""
|
||||
"""<tr><td class="fichetitre2">Formation: </td><td>%(titre)s</td></tr>"""
|
||||
% formation_dict
|
||||
)
|
||||
# Ligne: Inscrits
|
||||
H.append(
|
||||
@ -300,17 +303,18 @@ def moduleimpl_status(moduleimpl_id=None, partition_id=None):
|
||||
)
|
||||
if current_user.has_permission(Permission.ScoEtudInscrit):
|
||||
H.append(
|
||||
f"""<a class="stdlink" style="margin-left:2em;" href="moduleimpl_inscriptions_edit?moduleimpl_id={modimpl.id}">modifier</a>"""
|
||||
"""<a class="stdlink" style="margin-left:2em;" href="moduleimpl_inscriptions_edit?moduleimpl_id=%s">modifier</a>"""
|
||||
% mi_dict["moduleimpl_id"]
|
||||
)
|
||||
H.append("</td></tr>")
|
||||
# Ligne: règle de calcul
|
||||
has_expression = sco_compute_moy.moduleimpl_has_expression(modimpl)
|
||||
has_expression = sco_compute_moy.moduleimpl_has_expression(mi_dict)
|
||||
if has_expression:
|
||||
H.append(
|
||||
f"""<tr>
|
||||
<td class="fichetitre2" colspan="4">Règle de calcul:
|
||||
<span class="formula" title="mode de calcul de la moyenne du module"
|
||||
>moyenne=<tt>{modimpl.computation_expr}</tt>
|
||||
>moyenne=<tt>{mi_dict["computation_expr"]}</tt>
|
||||
</span>"""
|
||||
)
|
||||
H.append("""<span class="warning">inutilisée dans cette version de ScoDoc""")
|
||||
@ -417,20 +421,21 @@ def moduleimpl_status(moduleimpl_id=None, partition_id=None):
|
||||
</form>
|
||||
</p>
|
||||
"""
|
||||
% mi_dict
|
||||
)
|
||||
|
||||
# -------- Tableau des evaluations
|
||||
top_table_links = ""
|
||||
if can_edit_evals:
|
||||
top_table_links = f"""<a class="stdlink" href="{
|
||||
url_for("notes.evaluation_create", scodoc_dept=g.scodoc_dept, moduleimpl_id=modimpl.id)
|
||||
url_for("notes.evaluation_create", scodoc_dept=g.scodoc_dept, moduleimpl_id=mi_dict['moduleimpl_id'])
|
||||
}">Créer nouvelle évaluation</a>
|
||||
"""
|
||||
if nb_evaluations > 0:
|
||||
top_table_links += f"""
|
||||
<a class="stdlink" style="margin-left:2em;" href="{
|
||||
url_for("notes.moduleimpl_evaluation_renumber",
|
||||
scodoc_dept=g.scodoc_dept, moduleimpl_id=modimpl.id,
|
||||
scodoc_dept=g.scodoc_dept, moduleimpl_id=mi_dict['moduleimpl_id'],
|
||||
redirect=1)
|
||||
}">Trier par date</a>
|
||||
"""
|
||||
|
@ -649,7 +649,7 @@ table.dataTable.gt_table {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
/* Tables non centrées (inutile) */
|
||||
/* Tables non centrées */
|
||||
table.dataTable.gt_table.gt_left {
|
||||
margin-left: 16px;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.4.37"
|
||||
SCOVERSION = "9.4.40"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user