Moodle
  1. Moodle
  2. MDL-26242

Exception thrown by the quiz overview report when there are no students in the course

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Quiz
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      See http://moodle.org/mod/forum/discuss.php?d=167804

      If there are no students in the course, but there are quiz attempts, then you get a get_in_or_equal won't accept and empty array coding error.

        Gliffy Diagrams

          Activity

          Hide
          Tim Hunt added a comment -

          To test: (as admin)

          1. Create a new course.
          2. Create a quiz with some questions.
          3. Switch role to student.
          4. Attempt the quiz.
          5. Switch back to your normal role.
          6. Go to the quiz reports.

          Before the fix, you got a coding_exception thrown. After the fix, you correctly see a blank report. (or that attempt by Admin, if Include is set to 'All attempts', instead of 'all Participants ...'.)

          Show
          Tim Hunt added a comment - To test: (as admin) 1. Create a new course. 2. Create a quiz with some questions. 3. Switch role to student. 4. Attempt the quiz. 5. Switch back to your normal role. 6. Go to the quiz reports. Before the fix, you got a coding_exception thrown. After the fix, you correctly see a blank report. (or that attempt by Admin, if Include is set to 'All attempts', instead of 'all Participants ...'.)

            People

            • Assignee:
              Tim Hunt
              Reporter:
              Tim Hunt
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: