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

AJAX Grading causes error with activities with no grades

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.1
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-38149_ajax

      Description

      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."

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Mar/13