forked from ScoDoc/ScoDoc
Tableau bord module: n'affiche pas saisie abs pour groupes vides
This commit is contained in:
parent
c547990eef
commit
c73581c52f
@ -875,11 +875,15 @@ def _make_listes_sem(formsemestre: FormSemestre, with_absences=True):
|
|||||||
H.append("<h4>Tous les étudiants</h4>")
|
H.append("<h4>Tous les étudiants</h4>")
|
||||||
else:
|
else:
|
||||||
H.append("<h4>Groupes de %(partition_name)s</h4>" % partition)
|
H.append("<h4>Groupes de %(partition_name)s</h4>" % partition)
|
||||||
|
partition_is_empty = True
|
||||||
groups = sco_groups.get_partition_groups(partition)
|
groups = sco_groups.get_partition_groups(partition)
|
||||||
if groups:
|
if groups:
|
||||||
H.append("<table>")
|
H.append("<table>")
|
||||||
for group in groups:
|
for group in groups:
|
||||||
n_members = len(sco_groups.get_group_members(group["group_id"]))
|
n_members = len(sco_groups.get_group_members(group["group_id"]))
|
||||||
|
if n_members == 0:
|
||||||
|
continue # skip empty groups
|
||||||
|
partition_is_empty = False
|
||||||
group["url_etat"] = url_for(
|
group["url_etat"] = url_for(
|
||||||
"absences.EtatAbsencesGr",
|
"absences.EtatAbsencesGr",
|
||||||
group_ids=group["group_id"],
|
group_ids=group["group_id"],
|
||||||
@ -912,8 +916,8 @@ def _make_listes_sem(formsemestre: FormSemestre, with_absences=True):
|
|||||||
|
|
||||||
H.append("</tr>")
|
H.append("</tr>")
|
||||||
H.append("</table>")
|
H.append("</table>")
|
||||||
else:
|
if partition_is_empty:
|
||||||
H.append('<p class="help indent">Aucun groupe dans cette partition')
|
H.append('<p class="help indent">Aucun groupe peuplé dans cette partition')
|
||||||
if sco_groups.sco_permissions_check.can_change_groups(formsemestre.id):
|
if sco_groups.sco_permissions_check.can_change_groups(formsemestre.id):
|
||||||
H.append(
|
H.append(
|
||||||
f""" (<a href="{url_for("scolar.affect_groups",
|
f""" (<a href="{url_for("scolar.affect_groups",
|
||||||
|
Loading…
Reference in New Issue
Block a user