diff --git a/app/scodoc/notes_table.py b/app/scodoc/notes_table.py index 2f75395f54..6e849893f1 100644 --- a/app/scodoc/notes_table.py +++ b/app/scodoc/notes_table.py @@ -72,10 +72,6 @@ from app.scodoc import sco_preferences from app.scodoc import sco_etud -# Support for old user-written "bonus" functions with 2 args: -BONUS_TWO_ARGS = len(inspect.getargspec(scu.CONFIG.compute_bonus)[0]) == 2 - - def comp_ranks(T): """Calcul rangs à partir d'une liste ordonnée de tuples [ (valeur, ..., etudid) ] (valeur est une note numérique), en tenant compte des ex-aequos @@ -934,15 +930,9 @@ class NotesTable(object): if len(coefs_bonus_gen) == 1: coefs_bonus_gen = [1.0] # irrelevant, may be zero - if BONUS_TWO_ARGS: - # backward compat: compute_bonus took only 2 args - bonus = scu.CONFIG.compute_bonus( - notes_bonus_gen, coefs_bonus_gen - ) - else: - bonus = scu.CONFIG.compute_bonus( - notes_bonus_gen, coefs_bonus_gen, infos=infos - ) + bonus = scu.CONFIG.compute_bonus( + notes_bonus_gen, coefs_bonus_gen, infos=infos + ) self.bonus[etudid] = bonus infos["moy"] += bonus infos["moy"] = min(infos["moy"], 20.0) # clip bogus bonus