forked from ScoDoc/ScoDoc
Tableau recap: affichage UE cap.
This commit is contained in:
parent
c05660bf83
commit
78e97a43e4
@ -484,7 +484,7 @@ class NotesTableCompat(ResultatsSemestre):
|
||||
|
||||
def get_etud_moy_gen(self, etudid): # -> float | str
|
||||
"""Moyenne générale de cet etudiant dans ce semestre.
|
||||
Prend(ra) en compte les UE capitalisées. (TODO) XXX
|
||||
Prend en compte les UE capitalisées.
|
||||
Si apc, moyenne indicative.
|
||||
Si pas de notes: 'NA'
|
||||
"""
|
||||
@ -610,7 +610,7 @@ class NotesTableCompat(ResultatsSemestre):
|
||||
"""
|
||||
table_moyennes = []
|
||||
etuds_inscriptions = self.formsemestre.etuds_inscriptions
|
||||
|
||||
ues = self.formsemestre.query_ues() # sans bonus
|
||||
for etudid in etuds_inscriptions:
|
||||
moy_gen = self.etud_moy_gen.get(etudid, False)
|
||||
if moy_gen is False:
|
||||
@ -621,11 +621,19 @@ class NotesTableCompat(ResultatsSemestre):
|
||||
+ ["NI"] * len(self.formsemestre.modimpls_sorted)
|
||||
)
|
||||
else:
|
||||
moy_ues = self.etud_moy_ue.loc[etudid]
|
||||
moy_ues = []
|
||||
ue_is_cap = {}
|
||||
for ue in ues:
|
||||
ue_status = self.get_etud_ue_status(etudid, ue.id)
|
||||
moy_ues.append(ue_status["moy"])
|
||||
ue_is_cap[ue.id] = ue_status["is_capitalized"]
|
||||
t = [moy_gen] + list(moy_ues)
|
||||
# TODO UE capitalisées: ne pas afficher moyennes modules
|
||||
# Moyennes modules:
|
||||
for modimpl in self.formsemestre.modimpls_sorted:
|
||||
val = self.get_etud_mod_moy(modimpl.id, etudid)
|
||||
if ue_is_cap.get(modimpl.module.ue.id, False):
|
||||
val = "-c-"
|
||||
else:
|
||||
val = self.get_etud_mod_moy(modimpl.id, etudid)
|
||||
t.append(val)
|
||||
t.append(etudid)
|
||||
table_moyennes.append(t)
|
||||
|
Loading…
Reference in New Issue
Block a user