1
0
Fork 0

En BUT, n'affiche plus l'UE de rattachement dans Voir les inscriptions aux modules. Closes #523

This commit is contained in:
Emmanuel Viennet 2022-11-08 00:19:50 +01:00
parent d4675688da
commit 836c57ec98
1 changed files with 40 additions and 11 deletions

View File

@ -251,6 +251,8 @@ def moduleimpl_inscriptions_stats(formsemestre_id):
<code du module>: <nb inscrits> (<description en termes de groupes>)
...
En APC, n'affiche pas la colonne UE, car le rattachement n'a pas
d'importance pédagogique.
descriptions:
groupes de TD A, B et C
@ -301,7 +303,14 @@ def moduleimpl_inscriptions_stats(formsemestre_id):
if options:
H.append("<h3>Modules auxquels tous les étudiants ne sont pas inscrits:</h3>")
H.append(
'<table class="formsemestre_status formsemestre_inscr"><tr><th>UE</th><th>Code</th><th>Inscrits</th><th></th></tr>'
f"""<table class="formsemestre_status formsemestre_inscr">
<tr>
{'<th>UE</th>' if not is_apc else ""}
<th>Code</th>
<th>Inscrits</th>
<th></th>
</tr>
"""
)
for modimpl in options:
if can_change:
@ -313,13 +322,24 @@ def moduleimpl_inscriptions_stats(formsemestre_id):
"""
else:
c_link = mod_description[modimpl.id]
H.append("""<tr class="formsemestre_status">""")
if not is_apc:
H.append(
f"""
<td>{
modimpl.module.ue.acronyme or ""
}</td>
"""
)
H.append(
f"""<tr class="formsemestre_status"><td>{
modimpl.module.ue.acronyme or ""
}</td><td class="formsemestre_status_code">{
f"""
<td class="formsemestre_status_code">{
modimpl.module.code or "(module sans code)"
}</td><td class="formsemestre_status_inscrits">{
mod_nb_inscrits[modimpl.id]}</td><td>{c_link}</td></tr>"""
}</td>
<td class="formsemestre_status_inscrits">{
mod_nb_inscrits[modimpl.id]}</td><td>{c_link}</td>
</tr>
"""
)
H.append("</table>")
else:
@ -330,10 +350,13 @@ def moduleimpl_inscriptions_stats(formsemestre_id):
if commons:
H.append(
"""<h3>Modules communs (auxquels tous les étudiants sont inscrits):</h3>
f"""<h3>Modules communs (auxquels tous les étudiants sont inscrits):</h3>
<table class="formsemestre_status formsemestre_inscr">
<tr><th>UE</th><th>Code</th><th>Module</th>"""
<tr>
{'<th>UE</th>' if not is_apc else ""}
<th>Code</th>
<th>Module</th>"""
)
if is_apc:
H.append("<th>Parcours</th>")
@ -346,10 +369,16 @@ def moduleimpl_inscriptions_stats(formsemestre_id):
}">{modimpl.module.titre}</a>"""
else:
c_link = modimpl.module.titre
H.append("""<tr class="formsemestre_status_green">""")
if not is_apc:
H.append(
f"""
<td>{modimpl.module.ue.acronyme or ""}</td>
"""
)
H.append(
f"""<tr class="formsemestre_status_green"><td>{
modimpl.module.ue.acronyme or ""
}</td><td class="formsemestre_status_code">{
f"""
<td class="formsemestre_status_code">{
modimpl.module.code or "(module sans code)"
}</td><td>{c_link}</td>"""
)