Moodle

Quiz overview report download is broken - patch

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.1
  • Fix Version/s: 1.9.2
  • Component/s: Quiz
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    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';

Issue Links

Activity

Hide
Stephan Goeldi added a comment -

Thanks! patch works fine!

Show
Stephan Goeldi added a comment - Thanks! patch works fine!
Hide
Jamie Pratt added a comment -

I committed a fix similar to the one suggested to HEAD and 1.9 stable.

Show
Jamie Pratt added a comment - I committed a fix similar to the one suggested to HEAD and 1.9 stable.
Hide
Tim Hunt added a comment -

Filling in missing fix verision, dug out of CVS.

Show
Tim Hunt added a comment - Filling in missing fix verision, dug out of CVS.
Hide
Jerome Mouneyrac added a comment -

Tested 3 kind of download (OSD, Excel, Text file). They work fine on 1.9
Thanks for your participation.

Show
Jerome Mouneyrac added a comment - Tested 3 kind of download (OSD, Excel, Text file). They work fine on 1.9 Thanks for your participation.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: