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

Quiz overview report download is broken - patch

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.1
    • 1.9.2
    • Quiz
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      Using the latest MOODLE_19_STABLE ( updated from cvs on 5/29).

      Downloading the overview report in CSV format results in a text file with only the header row - no rows for the user attempts. Downloading in ODS format results in a blank page and no download. I'm seeing the following in the apache error log for each download:

      PHP Fatal error: Call to a member function get_sql_sort() on a non-object in /moodle/htdocs/moodleupgrade/mod/quiz/report/overview/report.php on line 355, referer: http://elearningtest.itrc.isu.edu/moodleupgrade/mod/quiz/report.php?q=469

      Here's a patch -

      Index: report.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/mod/quiz/report/overview/report.php,v
      retrieving revision 1.98.2.29
      diff -u -r1.98.2.29 report.php
      — report.php 16 May 2008 14:44:05 -0000 1.98.2.29
      +++ report.php 29 May 2008 13:08:12 -0000
      @@ -352,7 +352,10 @@

      $countsql = 'SELECT COUNT(DISTINCT('.sql_concat('u.id', '\'#\'', $db->IfNull('qa.attempt', '0')).')) '.$from.$
      where;

      + if (!$download)

      { $sort = $table->get_sql_sort(); + }

      +
      // Fix some wired sorting
      if (empty($sort)) {
      $sort = ' ORDER BY uniqueid';

      Attachments

        Issue Links

          Activity

            People

              jamiesensei Jamie Pratt
              adamann2 Ann Adamcik
              Jérôme Mouneyrac Jérôme Mouneyrac
              Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Jul/08