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

The grader report does not accept unlimited grades

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-80766-403
    • Hide

      Setup

      1. Log in as admin
      2. Create a user
      3. Create a course
      4. Enrol user as student in course
      5. Navigate to course gradebook
      6. Select Gradebook setup
      7. Press Add > Add grade item
        • Item name: Demo
        • Minimum: 0
        • Maximum: 10

      Test

      1. Select Grader report
      2. Turn editing on
      3. Enter 11 in the number field for test user and Demo grade item
      4. Press Save changes
      5. Confirm you get a warning stating similar the maximum value is 10
      6. Navigate to Grades > General settings in site administration
      7. Enable Unlimited grades and save
      8. Navigate back to course Grader report
      9. Enter 11 in the number field for test user and Demo grade item
      10. Press Save changes
      11. Confirm the grade change was saved successfully
      12. Repeat the same steps using the Single view report after selecting the test user
      Show
      Setup Log in as admin Create a user Create a course Enrol user as student in course Navigate to course gradebook Select Gradebook setup Press Add > Add grade item Item name: Demo Minimum: 0 Maximum: 10 Test Select Grader report Turn editing on Enter 11 in the number field for test user and Demo grade item Press Save changes Confirm you get a warning stating similar the maximum value is 10 Navigate to Grades > General settings in site administration Enable Unlimited grades and save Navigate back to course Grader report Enter 11 in the number field for test user and Demo grade item Press Save changes Confirm the grade change was saved successfully Repeat the same steps using the Single view report after selecting the test user

      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?  

        1. MDL-80766.png
          428 kB
          Ron Carl Alfon Yu
        2. Moodle grade.jpg
          92 kB
          Andrew Ruether
        3. Moodle grade warning.jpg
          23 kB
          Andrew Ruether
        4. unlimited grades.jpg
          68 kB
          Andrew Ruether

            pholden Paul Holden
            aruethe2 Andrew Ruether
            Mihail Geshoski Mihail Geshoski
            Glyn (Mathew) May Glyn (Mathew) May
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            7 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 29 minutes
                2h 29m

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