forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -183,3 +183,43 @@ def test_notes_rattrapage(test_client):
|
|||||||
)
|
)
|
||||||
# Note moyenne: revient à note normale
|
# Note moyenne: revient à note normale
|
||||||
assert b["ues"][0]["modules"][0]["mod_moy_txt"] == scu.fmt_note(10.0)
|
assert b["ues"][0]["modules"][0]["mod_moy_txt"] == scu.fmt_note(10.0)
|
||||||
|
# Supprime évaluation session 2
|
||||||
|
_, _, _ = G.create_note(
|
||||||
|
evaluation_id=e_session2["id"], etudid=etud["etudid"], note=scu.NOTES_SUPPRESS
|
||||||
|
)
|
||||||
|
evaluation = db.session.get(Evaluation, e_session2["id"])
|
||||||
|
assert evaluation
|
||||||
|
evaluation.delete()
|
||||||
|
#
|
||||||
|
# --- Evaluation bonus ---
|
||||||
|
#
|
||||||
|
# --- Création d'une évaluation "bonus"
|
||||||
|
e_bonus = G.create_evaluation(
|
||||||
|
moduleimpl_id=moduleimpl_id,
|
||||||
|
date_debut=datetime.datetime(2020, 1, 2),
|
||||||
|
description="evaluation bonus",
|
||||||
|
coefficient=1.0,
|
||||||
|
evaluation_type=Evaluation.EVALUATION_BONUS,
|
||||||
|
)
|
||||||
|
b = sco_bulletins.formsemestre_bulletinetud_dict(
|
||||||
|
sem["formsemestre_id"], etud["etudid"]
|
||||||
|
)
|
||||||
|
# Note moyenne sans bonus
|
||||||
|
assert b["ues"][0]["modules"][0]["mod_moy_txt"] == scu.fmt_note(10.0)
|
||||||
|
# Saisie note bonus
|
||||||
|
_, _, _ = G.create_note(
|
||||||
|
evaluation_id=e_bonus["id"], etudid=etud["etudid"], note=1.0
|
||||||
|
)
|
||||||
|
b = sco_bulletins.formsemestre_bulletinetud_dict(
|
||||||
|
sem["formsemestre_id"], etud["etudid"]
|
||||||
|
)
|
||||||
|
# Note moyenne sans bonus
|
||||||
|
assert b["ues"][0]["modules"][0]["mod_moy_txt"] == scu.fmt_note(11.0)
|
||||||
|
# Négatif, avec clip à zéro
|
||||||
|
_, _, _ = G.create_note(
|
||||||
|
evaluation_id=e_bonus["id"], etudid=etud["etudid"], note=-20.0
|
||||||
|
)
|
||||||
|
b = sco_bulletins.formsemestre_bulletinetud_dict(
|
||||||
|
sem["formsemestre_id"], etud["etudid"]
|
||||||
|
)
|
||||||
|
assert b["ues"][0]["modules"][0]["mod_moy_txt"] == scu.fmt_note(0.0)
|
||||||
|
Loading…
Reference in New Issue
Block a user