forked from ScoDoc/ScoDoc
affichage coefs UE dans bulles tableau bord semestre + qq typos
This commit is contained in:
parent
e5324e214c
commit
2f9b2a5a2d
@ -35,12 +35,12 @@ from flask import url_for
|
||||
from flask_login import current_user
|
||||
|
||||
from app import log
|
||||
from app.models import Module
|
||||
import app.scodoc.sco_utils as scu
|
||||
from app.scodoc.sco_utils import ModuleType
|
||||
import app.scodoc.notesdb as ndb
|
||||
from app.scodoc.sco_permissions import Permission
|
||||
from app.scodoc.sco_exceptions import ScoValueError, ScoInvalidDateError
|
||||
import sco_version
|
||||
from app.scodoc import html_sco_header
|
||||
from app.scodoc import htmlutils
|
||||
from app.scodoc import sco_abs
|
||||
@ -63,6 +63,7 @@ from app.scodoc import sco_preferences
|
||||
from app.scodoc import sco_users
|
||||
from app.scodoc.gen_tables import GenTable
|
||||
from app.scodoc.sco_formsemestre_custommenu import formsemestre_custommenu_html
|
||||
import sco_version
|
||||
|
||||
|
||||
def _build_menu_stats(formsemestre_id):
|
||||
@ -1112,13 +1113,19 @@ def formsemestre_tableau_modules(
|
||||
H = []
|
||||
prev_ue_id = None
|
||||
for modimpl in modimpls:
|
||||
mod = modimpl["module"]
|
||||
mod_descr = (
|
||||
"Module "
|
||||
+ modimpl["module"]["titre"]
|
||||
+ ", coef. "
|
||||
+ str(modimpl["module"]["coefficient"])
|
||||
)
|
||||
# mod = modimpl["module"]
|
||||
mod = Module.query.get(modimpl["module_id"])
|
||||
mod_descr = "Module " + mod.titre
|
||||
if mod.is_apc():
|
||||
coef_descr = ", ".join(
|
||||
[f"{ue_acro}: {co}" for ue_acro, co in mod.ue_coefs_descr()]
|
||||
)
|
||||
if coef_descr:
|
||||
mod_descr += "coefs: " + coef_descr
|
||||
else:
|
||||
mod_descr += " (pas de coefficients) "
|
||||
else:
|
||||
mod_descr += ", coef. " + str(mod.coefficient)
|
||||
mod_ens = sco_users.user_info(modimpl["responsable_id"])["nomcomplet"]
|
||||
if modimpl["ens"]:
|
||||
mod_ens += " (resp.), " + ", ".join(
|
||||
@ -1185,11 +1192,11 @@ def formsemestre_tableau_modules(
|
||||
|
||||
H.append(
|
||||
'<td class="formsemestre_status_code"><a href="moduleimpl_status?moduleimpl_id=%s" title="%s" class="stdlink">%s</a></td>'
|
||||
% (modimpl["moduleimpl_id"], mod_descr, mod["code"])
|
||||
% (modimpl["moduleimpl_id"], mod_descr, mod.code)
|
||||
)
|
||||
H.append(
|
||||
'<td class="scotext"><a href="moduleimpl_status?moduleimpl_id=%s" title="%s" class="formsemestre_status_link">%s</a></td>'
|
||||
% (modimpl["moduleimpl_id"], mod_descr, mod["abbrev"] or mod["titre"])
|
||||
% (modimpl["moduleimpl_id"], mod_descr, mod.abbrev or mod.titre)
|
||||
)
|
||||
H.append('<td class="formsemestre_status_inscrits">%s</td>' % len(mod_inscrits))
|
||||
H.append(
|
||||
@ -1201,7 +1208,7 @@ def formsemestre_tableau_modules(
|
||||
)
|
||||
)
|
||||
|
||||
if mod["module_type"] in (
|
||||
if mod.module_type in (
|
||||
ModuleType.STANDARD,
|
||||
ModuleType.RESSOURCE,
|
||||
ModuleType.SAE,
|
||||
@ -1227,7 +1234,7 @@ def formsemestre_tableau_modules(
|
||||
' <span><a class="redlink" href="moduleimpl_status?moduleimpl_id=%s" title="Il y a des notes en attente">[en attente]</a></span>'
|
||||
% modimpl["moduleimpl_id"]
|
||||
)
|
||||
elif mod["module_type"] == ModuleType.MALUS:
|
||||
elif mod.module_type == ModuleType.MALUS:
|
||||
nb_malus_notes = sum(
|
||||
[
|
||||
e["etat"]["nb_notes"]
|
||||
|
@ -48,7 +48,7 @@
|
||||
{% if editable %}
|
||||
<ul>
|
||||
<li class="notes_ue_list notes_ue_list_add"><a class="stdlink" href="{{
|
||||
url_for("notes.ue_create",
|
||||
url_for('notes.ue_create',
|
||||
scodoc_dept=g.scodoc_dept,
|
||||
formation_id=formation.id,
|
||||
)}}"
|
||||
|
@ -51,7 +51,7 @@
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li><a href="url_for('notes.ue_edit', scodoc_dept=g.scodoc_dept, ue_id=ue.id)"
|
||||
<li><a href="{{url_for('notes.ue_edit', scodoc_dept=g.scodoc_dept, ue_id=ue.id)}}"
|
||||
>modifier cette UE</a>
|
||||
</li>
|
||||
<li><a href="{{url_for("notes.ue_table",
|
||||
|
Loading…
Reference in New Issue
Block a user