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

    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MDL-50483-master
    • 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.

      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();
      

            lameze Simey Lameze
            rajeshtaneja Rajesh Taneja
            Simey Lameze Simey Lameze
            David Monllaó David Monllaó
            John Okely John Okely
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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