1
0
forked from ScoDoc/ScoDoc

fix: cas but avec modules exotiques + tableau bord si pas de coefs

This commit is contained in:
Emmanuel Viennet 2021-12-06 23:33:41 +01:00
parent 7d5160bb83
commit 5b7adf16ec
2 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,7 @@ from app.models import UniteEns, Identite
import app.scodoc.notesdb as ndb import app.scodoc.notesdb as ndb
from app.scodoc import sco_evaluation_db from app.scodoc import sco_evaluation_db
from app.scodoc import sco_utils as scu
class ModuleImpl(db.Model): class ModuleImpl(db.Model):
@ -68,7 +69,10 @@ class ModuleImpl(db.Model):
"""true si les poids des évaluations du module permettent de satisfaire """true si les poids des évaluations du module permettent de satisfaire
les coefficients du PN. les coefficients du PN.
""" """
if not self.module.formation.get_parcours().APC_SAE: if not self.module.formation.get_parcours().APC_SAE or (
self.module.module_type != scu.ModuleType.RESSOURCE
and self.module.module_type != scu.ModuleType.SAE
):
return True return True
from app.comp import moy_mod from app.comp import moy_mod

View File

@ -157,7 +157,7 @@ def moduleimpl_evaluation_menu(evaluation_id, nbnotes=0):
def _ue_coefs_html(coefs_descr) -> str: def _ue_coefs_html(coefs_descr) -> str:
""" """ """ """
max_coef = max([x[1] for x in coefs_descr]) max_coef = max([x[1] for x in coefs_descr]) if coefs_descr else 1.0
H = """ H = """
<div id="modimpl_coefs"> <div id="modimpl_coefs">
<div>Coefficients vers les UE</div> <div>Coefficients vers les UE</div>