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

Quiz Report broken in course without students

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.1
    • 1.9.2
    • Quiz
    • None
    • Mac OS X 10.5 MAMP 1.7.1 with Moodle 1.9.1
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      The quiz report generates an SQL error for courses which do not have any students enrolled in them. Asking for a report first generate a PHP error at line 297 of mod/quiz/report/overview/report.php because the array_keys method does not return an array. The empty $students variable then causes a bad SQL query to be generated. I have not looked at the code to figure out how to fix it but adding a student to the course fixes the problem. Presumably what is needed is a quick check for at least one student in the course to be inserted somewhere appropriate.

      I would regard this as a low priority bug because it really only affects developers but may cause new users worry if they try a moodle quiz for the first time before any students are added.

      Attachments

        Activity

          People

            jamiesensei Jamie Pratt
            moore Roger Moore
            Jérôme Mouneyrac Jérôme Mouneyrac
            Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jul/08