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

Fatal error while viewing user report and events are not generated for each user report viewed.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a course (Don't enrol any user)
      2. Click Grades and then select "User report"
      3. Set "Select all or one user" to "All users(0)"
      4. You should see the message:

        No students enrolled in this course yet

      5. Now, enrol an user on the course.
      6. Make sure the message is not displayed.
      Show
      Create a course (Don't enrol any user) Click Grades and then select "User report" Set "Select all or one user" to "All users(0)" You should see the message: No students enrolled in this course yet Now, enrol an user on the course. Make sure the message is not displayed.
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50483-master

      Description

      Steps to reproduce:

      1. Create a course (Don't enrol any user)
      2. Click Grades and then select "User report"
      3. Set "Select all or one user" to "All users(0)"
      4. You will observe fatal error.

      Problem is reports object is not created if no user is present and you are viewing all grades.

      Also, while on this part of code you will observe that following code is only placed in last so it will not trigger report->viewed event for each user, while viewing all the users.

      // Trigger report viewed event.
      $report->viewed();
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Nov/15