1
0
forked from ScoDoc/ScoDoc

Modification bulletins BUT: plus de moyennes indicatives de module

This commit is contained in:
Emmanuel Viennet 2021-12-16 00:03:24 +01:00
parent 1b2573d130
commit e06cf82db8
2 changed files with 18 additions and 25 deletions

View File

@ -152,18 +152,18 @@ class ResultatsSemestreBUT:
etud_idx = self.etud_index[etud.id]
for mi in modimpls:
mod_idx = self.modimpl_coefs_df.columns.get_loc(mi.id)
# moyennes indicatives (moyennes de moyennes d'UE)
try:
moyennes_etuds = np.nan_to_num(
np.nanmean(self.sem_cube[:, mod_idx, :], axis=1),
copy=False,
)
except RuntimeWarning: # all nans in np.nanmean (sur certains etuds sans notes valides)
pass
try:
moy_indicative_mod = np.nanmean(self.sem_cube[etud_idx, mod_idx])
except RuntimeWarning: # all nans in np.nanmean
pass
# # moyennes indicatives (moyennes de moyennes d'UE)
# try:
# moyennes_etuds = np.nan_to_num(
# np.nanmean(self.sem_cube[:, mod_idx, :], axis=1),
# copy=False,
# )
# except RuntimeWarning: # all nans in np.nanmean (sur certains etuds sans notes valides)
# pass
# try:
# moy_indicative_mod = np.nanmean(self.sem_cube[etud_idx, mod_idx])
# except RuntimeWarning: # all nans in np.nanmean
# pass
d[mi.module.code] = {
"id": mi.id,
"titre": mi.module.titre,
@ -174,11 +174,11 @@ class ResultatsSemestreBUT:
moduleimpl_id=mi.id,
),
"moyenne": {
# moyenne indicative de module: moyenne des UE, ignorant celles sans notes (nan)
"value": fmt_note(moy_indicative_mod),
"min": fmt_note(moyennes_etuds.min()),
"max": fmt_note(moyennes_etuds.max()),
"moy": fmt_note(moyennes_etuds.mean()),
# # moyenne indicative de module: moyenne des UE, ignorant celles sans notes (nan)
# "value": fmt_note(moy_indicative_mod),
# "min": fmt_note(moyennes_etuds.min()),
# "max": fmt_note(moyennes_etuds.max()),
# "moy": fmt_note(moyennes_etuds.mean()),
},
"evaluations": [
self.etud_eval_results(etud, e)

View File

@ -172,14 +172,7 @@ function showEvaluations(data) {
<div>
<div class=module>
<h3><a href="${content.url}">${numero} - ${content.titre}</a></h3>
<div>
<div class=moyenne>Moyenne&nbsp;indicative&nbsp;:&nbsp;${content.moyenne.value}</div>
<div class=info>
Classe&nbsp;:&nbsp;${content.moyenne.moy}&nbsp;-
Max&nbsp;:&nbsp;${content.moyenne.max}&nbsp;-
Min&nbsp;:&nbsp;${content.moyenne.min}
</div>
</div>
<div class=absences>
<div>Abs&nbsp;inj.</div><div>${content.absences?.injustifie || 0}</div>
<div>Total</div><div>${content.absences?.total || 0}</div>