This commit is contained in:
Emmanuel Viennet 2022-08-03 20:43:07 +02:00
parent 9413384a04
commit 54bf4a4f0f

View File

@ -808,9 +808,15 @@ class ResultatsSemestre(ResultatsCache):
coef = modimpl.module.coefficient or 0 coef = modimpl.module.coefficient or 0
row_coef[colid] = fmt_note(coef) row_coef[colid] = fmt_note(coef)
notes = self.modimpl_notes(modimpl.id, ue.id) notes = self.modimpl_notes(modimpl.id, ue.id)
row_min[colid] = fmt_note(np.nanmin(notes)) if np.isnan(notes).all():
row_max[colid] = fmt_note(np.nanmax(notes)) # aucune note valide
moy = np.nanmean(notes) row_min[colid] = np.nan
row_max[colid] = np.nan
moy = np.nan
else:
row_min[colid] = fmt_note(np.nanmin(notes))
row_max[colid] = fmt_note(np.nanmax(notes))
moy = np.nanmean(notes)
row_moy[colid] = fmt_note(moy) row_moy[colid] = fmt_note(moy)
if np.isnan(moy): if np.isnan(moy):
# aucune note dans ce module # aucune note dans ce module