forked from ScoDoc/ScoDoc
Listes notes BUT: restreint aux UE avec coef non nul
This commit is contained in:
parent
2511a26bf7
commit
1b887858bb
@ -39,14 +39,14 @@ from app.comp import res_sem
|
|||||||
from app.comp import moy_mod
|
from app.comp import moy_mod
|
||||||
from app.comp.moy_mod import ModuleImplResults
|
from app.comp.moy_mod import ModuleImplResults
|
||||||
from app.comp.res_common import NotesTableCompat
|
from app.comp.res_common import NotesTableCompat
|
||||||
|
from app.comp.res_but import ResultatsSemestreBUT
|
||||||
from app.models import FormSemestre
|
from app.models import FormSemestre
|
||||||
from app.models.evaluations import Evaluation
|
from app.models.evaluations import Evaluation
|
||||||
from app.models.moduleimpls import ModuleImpl
|
from app.models.moduleimpls import ModuleImpl
|
||||||
import app.scodoc.sco_utils as scu
|
import app.scodoc.sco_utils as scu
|
||||||
import app.scodoc.notesdb as ndb
|
import app.scodoc.notesdb as ndb
|
||||||
from app.scodoc.TrivialFormulator import TrivialFormulator
|
from app.scodoc.TrivialFormulator import TrivialFormulator
|
||||||
from app.scodoc import sco_cache
|
|
||||||
from app.scodoc import sco_edit_module
|
|
||||||
from app.scodoc import sco_evaluations
|
from app.scodoc import sco_evaluations
|
||||||
from app.scodoc import sco_evaluation_db
|
from app.scodoc import sco_evaluation_db
|
||||||
from app.scodoc import sco_formsemestre
|
from app.scodoc import sco_formsemestre
|
||||||
@ -391,7 +391,7 @@ def _make_table_notes(
|
|||||||
"_css_row_class": "moyenne sortbottom",
|
"_css_row_class": "moyenne sortbottom",
|
||||||
"_table_part": "foot",
|
"_table_part": "foot",
|
||||||
#'_nomprenom_td_attrs' : 'colspan="2" ',
|
#'_nomprenom_td_attrs' : 'colspan="2" ',
|
||||||
"nomprenom": "Moyenne (sans les absents) :",
|
"nomprenom": "Moyenne :",
|
||||||
"comment": "",
|
"comment": "",
|
||||||
}
|
}
|
||||||
# Ajoute les notes de chaque évaluation:
|
# Ajoute les notes de chaque évaluation:
|
||||||
@ -852,9 +852,13 @@ def _add_apc_columns(
|
|||||||
# => On recharge tout dans les nouveaux modèles
|
# => On recharge tout dans les nouveaux modèles
|
||||||
# rows est une liste de dict avec une clé "etudid"
|
# rows est une liste de dict avec une clé "etudid"
|
||||||
# on va y ajouter une clé par UE du semestre
|
# on va y ajouter une clé par UE du semestre
|
||||||
nt: NotesTableCompat = res_sem.load_formsemestre_results(modimpl.formsemestre)
|
nt: ResultatsSemestreBUT = res_sem.load_formsemestre_results(modimpl.formsemestre)
|
||||||
modimpl_results: ModuleImplResults = nt.modimpls_results[modimpl.id]
|
modimpl_results: ModuleImplResults = nt.modimpls_results[modimpl.id]
|
||||||
|
# les UE dans lesquelles ce module a un coef non nul:
|
||||||
|
ues_with_coef = nt.modimpl_coefs_df[modimpl.id][
|
||||||
|
nt.modimpl_coefs_df[modimpl.id] > 0
|
||||||
|
].index
|
||||||
|
ues = [ue for ue in ues if ue.id in ues_with_coef]
|
||||||
sum_by_ue = defaultdict(float)
|
sum_by_ue = defaultdict(float)
|
||||||
nb_notes_by_ue = defaultdict(int)
|
nb_notes_by_ue = defaultdict(int)
|
||||||
if is_conforme:
|
if is_conforme:
|
||||||
|
Loading…
Reference in New Issue
Block a user