forked from ScoDoc/ScoDoc
modimpls_in_ue en APC
This commit is contained in:
parent
f65ce0c1c7
commit
789bc7cb38
@ -14,7 +14,8 @@ from app import log
|
|||||||
from app.comp import moy_ue, moy_sem, inscr_mod
|
from app.comp import moy_ue, moy_sem, inscr_mod
|
||||||
from app.comp.res_common import NotesTableCompat
|
from app.comp.res_common import NotesTableCompat
|
||||||
from app.comp.bonus_spo import BonusSport
|
from app.comp.bonus_spo import BonusSport
|
||||||
from app.models import ScoDocSiteConfig, formsemestre
|
from app.models import ScoDocSiteConfig
|
||||||
|
from app.models.moduleimpls import ModuleImpl
|
||||||
from app.models.ues import UniteEns
|
from app.models.ues import UniteEns
|
||||||
from app.scodoc.sco_codes_parcours import UE_SPORT
|
from app.scodoc.sco_codes_parcours import UE_SPORT
|
||||||
|
|
||||||
@ -139,3 +140,16 @@ class ResultatsSemestreBUT(NotesTableCompat):
|
|||||||
(ne dépend pas des modules auxquels est inscrit l'étudiant, ).
|
(ne dépend pas des modules auxquels est inscrit l'étudiant, ).
|
||||||
"""
|
"""
|
||||||
return self.modimpl_coefs_df.loc[ue.id].sum()
|
return self.modimpl_coefs_df.loc[ue.id].sum()
|
||||||
|
|
||||||
|
def modimpls_in_ue(self, ue_id, etudid) -> list[ModuleImpl]:
|
||||||
|
"""Liste des modimpl ayant des coefs non nuls vers cette UE
|
||||||
|
et auxquels l'étudiant est inscrit.
|
||||||
|
"""
|
||||||
|
# sert pour l'affichage ou non de l'UE sur le bulletin
|
||||||
|
coefs = self.modimpl_coefs_df # row UE, cols modimpl
|
||||||
|
return [
|
||||||
|
modimpl
|
||||||
|
for modimpl in self.formsemestre.modimpls_sorted
|
||||||
|
if (coefs[modimpl.id][ue_id] != 0)
|
||||||
|
and self.modimpl_inscr_df[modimpl.id][etudid]
|
||||||
|
]
|
||||||
|
@ -134,7 +134,9 @@ class ModuleImplInscription(db.Model):
|
|||||||
def etud_modimpls_in_ue(
|
def etud_modimpls_in_ue(
|
||||||
cls, formsemestre_id: int, etudid: int, ue_id: int
|
cls, formsemestre_id: int, etudid: int, ue_id: int
|
||||||
) -> flask_sqlalchemy.BaseQuery:
|
) -> flask_sqlalchemy.BaseQuery:
|
||||||
"""moduleimpls de l'UE auxquels l'étudiant est inscrit"""
|
"""moduleimpls de l'UE auxquels l'étudiant est inscrit.
|
||||||
|
(Attention: inutile en APC, il faut considérer les coefficients)
|
||||||
|
"""
|
||||||
return ModuleImplInscription.query.filter(
|
return ModuleImplInscription.query.filter(
|
||||||
ModuleImplInscription.etudid == etudid,
|
ModuleImplInscription.etudid == etudid,
|
||||||
ModuleImplInscription.moduleimpl_id == ModuleImpl.id,
|
ModuleImplInscription.moduleimpl_id == ModuleImpl.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user