-
Bug
-
Resolution: Fixed
-
Critical
-
4.2.4, 4.2.5, 4.2.6, 4.3.1, 4.3.2, 4.3.3
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MDL-80766-403 -
MDL-79062 added input validation for the grader report that included checking if an entered value exceeds the maximum grade for the item. This validation does not respect the "unlimited grades" setting in Site Admin --> Grades --> General Settings. Even when unlimited grades are enabled, it is not possible to enter a grade over the item maximum.
Steps to reproduce:
- Go to Site Admin --> Grades --> General settings and check Unlimited Grades
- Go to an empty course with at least one student and create a single manual grade item with a maximum grade of 100
- Go to the Grader report, turn editing on, and enter a grade more than 100
- Save changes
- Observe a the warning message next to the grade item indicating "Value must be less than or equal to 100"
I believe this issue is related to client-side code and was caused by this line: https://github.com/moodle/moodle/blame/8ec1e5d96a9d71789e83134563e9fb34f555bec0/grade/templates/grades/grader/input.mustache#L35
By editing the HTML code in a browser developer console, I can manually adjust the maxvalue of the grade item input box, and can enter a grade higher than the maximum.
Perhaps the max value should only be included if Unlimited grades isn't checked?