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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.1
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/12