forked from ScoDoc/ScoDoc
Removed support for user defined BONUS functions with TWO arguments
This commit is contained in:
parent
d30c071c5d
commit
35c900b3d7
@ -72,10 +72,6 @@ from app.scodoc import sco_preferences
|
|||||||
from app.scodoc import sco_etud
|
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):
|
def comp_ranks(T):
|
||||||
"""Calcul rangs à partir d'une liste ordonnée de tuples [ (valeur, ..., etudid) ]
|
"""Calcul rangs à partir d'une liste ordonnée de tuples [ (valeur, ..., etudid) ]
|
||||||
(valeur est une note numérique), en tenant compte des ex-aequos
|
(valeur est une note numérique), en tenant compte des ex-aequos
|
||||||
@ -934,12 +930,6 @@ class NotesTable(object):
|
|||||||
if len(coefs_bonus_gen) == 1:
|
if len(coefs_bonus_gen) == 1:
|
||||||
coefs_bonus_gen = [1.0] # irrelevant, may be zero
|
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(
|
bonus = scu.CONFIG.compute_bonus(
|
||||||
notes_bonus_gen, coefs_bonus_gen, infos=infos
|
notes_bonus_gen, coefs_bonus_gen, infos=infos
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user