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

Can't access quiz reports (Using $this not in object context)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.3.1
    • 2.3
    • Quiz
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • Hide

      1. Create a quiz with review options set to no show Marks to students.
      2. Attempt the quiz as a student.
      3. As a teacher (not admin) try to view the quiz reports.

      Show
      1. Create a quiz with review options set to no show Marks to students. 2. Attempt the quiz as a student. 3. As a teacher (not admin) try to view the quiz reports.

      I am not sure how to reproduce this bug, but try:

      1. Create a quiz, with a question and do not start/do any attempt
      2. Go to the gradebook and grade a student
      3. Go to the quiz and view the attempts

      Fatal error: Using $this when not in object context in /home/fred/www/repositories/stable_master/moodle/mod/quiz/report/reportlib.php on line 416 

      These are the lines in context:

          return quiz_has_grades($quiz) &&
                  ($reviewoptions->marks >= question_display_options::MARK_AND_MAX ||
                  has_capability('moodle/grade:viewhidden', $this->context));

            timhunt Tim Hunt
            fred Frédéric Massart
            Dan Poltawski Dan Poltawski
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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