Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33532

Setting a maximum grade for a quiz doesn't work well with comma as a decimal separator (decsep).

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Hide

      1. With your language set to Croatian (or any other language that uses , for decsep)
      2. Go do Quiz settings -> Edit quiz (or whatever the translation is).
      3. Make sure you can set non-integer maximum grade (e.g. 65,5) , and maximum mark for each question.
      4. Make sure the value is saved as the non-integer value

      Show
      1. With your language set to Croatian (or any other language that uses , for decsep) 2. Go do Quiz settings -> Edit quiz (or whatever the translation is). 3. Make sure you can set non-integer maximum grade (e.g. 65,5) , and maximum mark for each question. 4. Make sure the value is saved as the non-integer value

      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.

            timhunt Tim Hunt
            kkroflin Krešimir Kroflin
            Dan Poltawski Dan Poltawski
            Dan Poltawski Dan Poltawski
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.