Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 13 additions and 11 deletions
Showing only changes of commit 720ca7222c - Show all commits

View File

@ -40,7 +40,6 @@ from flask import request
from app.comp import res_sem
from app.comp.res_compat import NotesTableCompat
from app.models import FormSemestre
from app.models import ScolarNews
import app.scodoc.sco_utils as scu
from app.scodoc.sco_utils import ModuleType
@ -217,19 +216,19 @@ def do_evaluation_etat(
(TotalNbMissing > 0)
and (E["evaluation_type"] != scu.EVALUATION_RATTRAPAGE)
and (E["evaluation_type"] != scu.EVALUATION_SESSION2)
and not is_malus
):
complete = False
else:
complete = True
if (
TotalNbMissing > 0
and ((TotalNbMissing == TotalNbAtt) or E["publish_incomplete"])
and not is_malus
):
evalattente = True
else:
evalattente = False
complete = (
(TotalNbMissing == 0)
or (E["evaluation_type"] == scu.EVALUATION_RATTRAPAGE)
or (E["evaluation_type"] == scu.EVALUATION_SESSION2)
)
evalattente = (TotalNbMissing > 0) and (
(TotalNbMissing == TotalNbAtt) or E["publish_incomplete"]
)
# mais ne met pas en attente les evals immediates sans aucune notes:
if E["publish_incomplete"] and nb_notes == 0:
evalattente = False

View File

@ -564,6 +564,9 @@ def _ligne_evaluation(
if modimpl.module.ue.type != UE_SPORT:
# Avertissement si coefs x poids nuls
if coef < scu.NOTES_PRECISION:
if modimpl.module.module_type == scu.ModuleType.MALUS:
H.append("""<span class="eval_warning_coef">malus</span>""")
else:
H.append("""<span class="eval_warning_coef">coef. nul !</span>""")
elif is_apc:
# visualisation des poids (Hinton map)