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

Manual grading validation does not work with comma as a decimal separator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2.6, 2.3.3
    • 2.2.5, 2.3.2, 2.4
    • Questions
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Hide

      You need to test in both English and French (for example, basically one lang where they say 0.5 and on where they say 0,5).

      You need to test both manual grading using the 'Make comment or override grade' link when reviewing a quiz attempt, and manual grading using Quiz -> Results -> Manual grading.

      You need to test

      • Valid grades are accepted.
      • Leaving the box blank does not set a grade. (If it was buggy, it might set the grade to 0.)
      • That you get a validation message if the number you type is out of range too high or too low.
      Show
      You need to test in both English and French (for example, basically one lang where they say 0.5 and on where they say 0,5). You need to test both manual grading using the 'Make comment or override grade' link when reviewing a quiz attempt, and manual grading using Quiz -> Results -> Manual grading. You need to test Valid grades are accepted. Leaving the box blank does not set a grade. (If it was buggy, it might set the grade to 0.) That you get a validation message if the number you type is out of range too high or too low.

      The code in is_manual_grade_in_range in question/behaviour/behaviourbase.php uses optional_param(... PARAM_FLOAT) which does not cope with numbers like 0,50. It should be using code like the PARAM_MARK case of get_submitted_var in question/engine/questionattempt.php

      Note that, because of the nature of this bug, the symptoms are very mild, I think that the worst that could happen in that if a teacher types 1,5 into the manual grade box for a question with maximum grade 1, then they will see a low-level DB exception, rather than a nice validation error in the UI.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jason Fowler Jason Fowler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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