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

AJAX Grading causes error with activities with no grades

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.3.5, 2.4.2
    • 2.3.4, 2.4.1
    • Gradebook
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MDL-38149_ajax
    • Hide

      Make sure you have ajax on.

      Create a brand new course and enrol at least one student. Don't create any activities.

      Go to the grader report and make sure you have grader report ajax on. Grader report settings are in the gradebook navigation drop down.

      Check that there are not JS errors in the error console with editing on and off.

      Add an activity and then go to the gradebook and give the student a grade.

      Go to a course with activities and existing grades and override a student grade. Check that you dont get any JS errors and that the override takes effect.

      Show
      Make sure you have ajax on. Create a brand new course and enrol at least one student. Don't create any activities. Go to the grader report and make sure you have grader report ajax on. Grader report settings are in the gradebook navigation drop down. Check that there are not JS errors in the error console with editing on and off. Add an activity and then go to the gradebook and give the student a grade. Go to a course with activities and existing grades and override a student grade. Check that you dont get any JS errors and that the override takes effect.

      Just filling this in From michaels comments in MDL-34800, since we are addressing this in a new issue:
      "I found one factor that you might be able to replicate for your testing. I am using a gradebook that has activities in it, but no actual grades. In other words, it is a fresh course restore. When I add some marks and click Update, the page refreshes and then things seem to work as expected. This might explain the difference I was seeing between versions before. After adding some grades in the stable version, the update button disappears as reported; in the integration version, the button is now disabled.
      I retested this with FF, Chrome and IE and they all reported a JS error. IE isolated it down to the following...
      SCRIPT5007: Unable to get property 'length' of undefined or null reference
      module.js, line 1 character 12608
      ...which seems to revolve around this statement...
      for(var i=0;i<this.report.grades.length;i++)if(this.report.grades[i]...
      ...which leads back to the report FF gave (shown above).
      I hope this helps."

            andyjdavis Andrew Davis
            poltawski Dan Poltawski
            Damyon Wiese Damyon Wiese
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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