-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
2.9.1
-
MOODLE_29_STABLE
While reviewing MDL-50894 I noticed that the method used to compute the percentage of the grades was not right in the availability condition grade.
In get_cached_grade_score a few things are wrong:
- Assumption that min and max have different values, this is not the case in single item scales.
- Using grade_grade.rawgrademin/max, that is not reliable see
MDL-46618 - Duplicates the code that generates the percentage (grade_format_gradevalue_percentage), which can be a problem as not everyone would assume that in the following example the percentage is 50%, and we might change that later:
- grademin = 50
- grademax = 100
- finalgrade = 75
The third point is the least important but it's good to consider it.
- has a non-specific relationship to
-
MDL-50894 Cron Error: division by zero warning in lib/conditionlib.php
-
- Closed
-