-
Bug
-
Resolution: Fixed
-
Minor
-
2.2.3, 2.3
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
-
If the user's language uses comma as a decimal separator, setting a maximum grade doesn't work well.
Steps to reproduce:
1. Set your language to a language that uses comma as decimal separator (decsep). (I'm using Hrvatski / Croatian)
2. Create a quiz and open "Edit quiz" page. (Or do this step first, then change the language in a new tab, and refresh "Edit quiz" page. )
3. Set maximum grade (najveća ocjena) to "65,5" (comma) and click "Save"/"Pohrani".
4. Maximum grade is now 65 instead of 65,5.
5. Set 65.5 (dot) as maximum grade and click "Save".
6. Maximum grade is now 65,5 (notice the comma).
7. Click "Save" without changing the grade.
8. Maximum grade is now back to 65.
This isn't a big issue in quiz editing, but maybe some other important part of Moodle is broken too. The problem seems to be within the function optional_param() which rounds the value because php's floatval() works only with dots.