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

Use built-in form validation for grade value inputs in the single view grade report

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-80041-402
    • MDL-80041-403
    • MDL-80041-main
    • Hide
      Setup
      1. Create a course with a few gradable activities (e.g. assignments, quizzes, forums, etc.) Take note of the minimum/maximum grades for these activities.
      2. Enrol at least one student in the course
      3. As teacher/admin, go to the course's Grades > View > Single view report page.

      Note: Test this on different supported browsers.

      Test - View by Users
      1. Set View by to Users
      2. Select a student
      3. Turn editing mode on, Override all on the Actions menu.
      4. Try to edit the grade of the student
      5. Confirm the grade input fields now accept only numeric values. Try to enter a non-numeric value (e.g. on Firefox or by copy-pasting a non-numeric text). You will get a data validation error, or it will simply ignore the non-numeric input.
      6. Confirm that you get a validation error if you enter a value below the minimum grade or above the maximum grade.
      7. Try to edit a feedback field
      8. Confirm that you can enter any text on the feedback fields.
      Test - View by Grade items
      1. Set View by to Grade items
      2. Select a grade item
      3. Turn editing mode on, Override all on the Actions menu.
      4. Try to edit the grade of the student
      5. Confirm the grade input fields now accept only numeric values. Try to enter a non-numeric value (e.g. on Firefox or by copy-pasting a non-numeric text). You will get a data validation error, or it will simply ignore the non-numeric input.
      6. Confirm that you get a validation error if you enter a value below the minimum grade or above the maximum grade.
      7. Try to edit a feedback field
      8. Confirm that you can enter any text on the feedback fields.
      Show
      Setup Create a course with a few gradable activities (e.g. assignments, quizzes, forums, etc.) Take note of the minimum/maximum grades for these activities. Enrol at least one student in the course As teacher/admin, go to the course's Grades > View > Single view report page. Note: Test this on different supported browsers. Test - View by Users Set View by to Users Select a student Turn editing mode on, Override all on the Actions menu. Try to edit the grade of the student Confirm the grade input fields now accept only numeric values. Try to enter a non-numeric value (e.g. on Firefox or by copy-pasting a non-numeric text). You will get a data validation error, or it will simply ignore the non-numeric input. Confirm that you get a validation error if you enter a value below the minimum grade or above the maximum grade. Try to edit a feedback field Confirm that you can enter any text on the feedback fields. Test - View by Grade items Set View by to Grade items Select a grade item Turn editing mode on, Override all on the Actions menu. Try to edit the grade of the student Confirm the grade input fields now accept only numeric values. Try to enter a non-numeric value (e.g. on Firefox or by copy-pasting a non-numeric text). You will get a data validation error, or it will simply ignore the non-numeric input. Confirm that you get a validation error if you enter a value below the minimum grade or above the maximum grade. Try to edit a feedback field Confirm that you can enter any text on the feedback fields.

      In MDL-79062, the following items were raised on the grader report:

      • Grade input fields accept alphabet characters but no warning is given when the form is submitted. These characters are not valid and the data field defaults to 0.00.
      • Grades over the maximum value, when added to the grade input are identified, but the error message is not near to the input field in which it refers to.

      So I have set the input type of the grade fields to number and applied min and max attributes when applicable in order to leverage the browser's built-in form validation. This is only applicable though if the decimal separator in langconfig is set to period.

      This was not raised for the Single view report in the accessibility audit, but I think it would also be good to implement this, especially when overriding grades in the Single view report.

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Mathew May Mathew May
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours, 5 minutes
                7h 5m

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