Issue Details (XML | Word | Printable)

Key: MDL-15047
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Jamie Pratt
Reporter: Ann Adamcik
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Quiz overview report download is broken - patch

Created: 30/May/08 03:55 AM   Updated: 10/Mar/09 10:54 AM
Component/s: Quiz
Affects Version/s: 1.9.1
Fix Version/s: 1.9.2

Issue Links:
Duplicate
 

Participants: Ann Adamcik, Jamie Pratt, Jerome Mouneyrac, Stephan Goeldi and Tim Hunt
Security Level: None
QA Assignee: Jerome Mouneyrac
Resolved date: 30/May/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
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';



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Stephan Goeldi added a comment - 30/May/08 05:05 PM
Thanks! patch works fine!

Jamie Pratt added a comment - 30/May/08 08:24 PM
I committed a fix similar to the one suggested to HEAD and 1.9 stable.

Tim Hunt added a comment - 03/Mar/09 10:39 AM
Filling in missing fix verision, dug out of CVS.

Jerome Mouneyrac added a comment - 10/Mar/09 10:54 AM
Tested 3 kind of download (OSD, Excel, Text file). They work fine on 1.9
Thanks for your participation.