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

Grader report doesn't show an error message when an invalid grade is entered in AJAX mode

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • master-MDL-69791
    • Hide

      Automated testing

      1. Confirm, that behat tests pass:

      vendor/bin/behat --config /var/www/behatdata/behatrun/behat/behat.yml grade/report/grader/tests/behat/ajax_grader.feature
      

      Manual testing

      1. Create a course.
      2. Enrol yourself.
      3. Add an assignment activity.
      4. Go to gradebook.
      5. Go to Setup / Preferences: Grader report.
      6. Set "Enable AJAX" to Yes.
      7. Go back to gradebook (grader report).
      8. Click Turn editing on button.
      9. Give a normal grade (eg 33) for the assignment activity and click away from the input field.
      10. Confirm, that the grade is saved and displayed.
      11. Give an invalid grade like (eg 999) for the assignment activity and click away from the input field.
      12. Confirm, that there is an error displayed saying that the grade is too big.
      13. Click on the error.
      14. Confirm, the error is hidden and the old grade is shown (33).

       

      Show
      Automated testing 1. Confirm , that behat tests pass: vendor/bin/behat --config /var/www/behatdata/behatrun/behat/behat.yml grade/report/grader/tests/behat/ajax_grader.feature Manual testing Create a course. Enrol yourself. Add an assignment activity. Go to gradebook. Go to Setup / Preferences: Grader report. Set "Enable AJAX" to Yes. Go back to gradebook (grader report). Click Turn editing on button. Give a normal grade (eg 33) for the assignment activity and click away from the input field. Confirm , that the grade is saved and displayed. Give an invalid grade like (eg 999) for the assignment activity and click away from the input field. Confirm , that there is an error displayed saying that the grade is too big. Click on the error. Confirm , the error is hidden and the old grade is shown (33).  

    Description

      How to replicate:

      1. Create a course.
      2. Enrol yourself.
      3. Add an assignment activity.
      4. Go to gradebook.
      5. Go to Setup / Preferences: Grader report.
      6. Set "Show quick feedback" to Yes.
      7. Set "Enable AJAX" to Yes.
      8. Go back to gradebook (grader report).
      9. Click Turn editing on button.
      10. Enter invalid grade like 999 and hit tab.
      11. Confirm, there is no error displayed saying that the grade is too big.
      12. Open console tab and check the error:
      13. module.js:572 Uncaught TypeError: Cannot read property 'set' of null
            at M.gradereport_grader.classes.ajax.submission_outcome (module.js:572)
            at Y.Subscriber._notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13680)
            at Y.Subscriber.notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13709)
            at Y.CustomEvent._notify (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13372)
            at Y.CustomEvent._procSubs (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13498)
            at Y.CustomEvent.fireSimple (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13465)
            at Y.CustomEvent._fire (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:13447)
            at IO.fire (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:14600)
            at IO._evt (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:23686)
            at IO.complete (yui_combo.php?rollup/3.17.2/yui-moodlesimple.js:23722)
        

      Attachments

        Issue Links

          Activity

            People

              mikhailgolenkov Misha Golenkov
              mikhailgolenkov Misha Golenkov
              Dmitrii Metelkin Dmitrii Metelkin
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Janelle Barcega Janelle Barcega
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/20

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 20 minutes
                  1h 20m