PROD-287 | Add an optional treat_undefined_as_zero flag to the helper...
PROD-287 | Add an optional treat_undefined_as_zero flag to the helper functions is_score_higher_or_equal() and compare_scores(), which defaults to False, that we call with value True from SubsectionGradeFactory.update(), which occassionally deals with invalid subsection scores containing zero as the denominator.
Showing
- lms/djangoapps/grades/subsection_grade_factory.py 5 additions, 4 deletionslms/djangoapps/grades/subsection_grade_factory.py
- lms/djangoapps/grades/tests/test_subsection_grade_factory.py 16 additions, 0 deletionslms/djangoapps/grades/tests/test_subsection_grade_factory.py
- openedx/core/lib/grade_utils.py 25 additions, 5 deletionsopenedx/core/lib/grade_utils.py
- openedx/core/lib/tests/test_grade_utils.py 47 additions, 0 deletionsopenedx/core/lib/tests/test_grade_utils.py
openedx/core/lib/tests/test_grade_utils.py
0 → 100644
Please register or sign in to comment