I've just run a quiz and everything went fine. However, in trying to download the data in Excel format, I get no file. I can get a text version, but the layout of the Excel version uses the sheets for each section of the results. Is there something I need to check or tweak to get the Excel file?
Jay
Can you get the results on the screen? Do you get any error messages at all? Does the download function work with other, perhaps shorter quizzes?
Also, what kind of system are you running Moodle on?
Yes, I get results on the screen. No error messages. I've only run the one quiz, so I can't compare (sorry), but I did run the same quiz on another installation (at another completely different site) with no problems getting the Excel data. Both installations are moodle 1.2.1, and the one I'm having troubles on is on Mac OS X 10.3.3 in my office (the other installation is on a hosted board, linux, I think). Mysql is 3.x, php is 4.x.
If I use Safari to download the Excel file, I see the download page just scrolling by, but nothing downloads. If I use Netscape, I get a file, but it's void of data...
Jay
<br /> | |||||||||||||
<b>Fatal error</b>: Cannot instantiate non-existent class: format in <b>c:\easyphp1-7\www\moodle\lib\excel\Workbook.php</b> on line <b>67</b><br /> |
If my hypothesis is correct, you should be able to fix your problem by editing the file
c:\easyphp1-7\www\moodle\lib\excel\Workbook.php as follows:
replace the line
require_once('Format.php');
by
require_once("$CFG->libdir/excel/Format.php");
Let me know either if this fixes your problem or not. If it does, I'll put the fix in the CVS.
I got the files with no problem now.
You da' man!
Now, should I make the same change with the other installation as well, or should I leave it (it works as it is)?
Jay
I also use OX X 10.3.3 so decided to check this out. I found the same results as Jay. In a quiz, the detailed statistics show nicely on screen. In Mozilla browser, when I click on Save as Excel, processes starts but the end result is an excel file of zero KB. Same results with either quizzes with either 50 or 300 attempts. Text file format seems to download OK. I tried this process also on Safari, but there in my download manager window, the report.php script just hung and ran continuously.
Let me know if it works.
Hallo thanks for your help.
I get this:
<br /> | ||||||||||||||||||
<b>Parse error</b>: parse error, unexpected T_REQUIRE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>c:\easyphp1-7\www\moodle\lib\excel\Workbook.php</b> on line <b>99</b><br /> | ||||||||||||||||||
<br /> | ||||||||||||||||||
<b>Fatal error</b>: Cannot instantiate non-existent class: workbook in <b>c:\easyphp1-7\www\moodle\mod\quiz\report\fullstat\report.php</b> on line <b>306</b><br /> | ||||||||||||||||||
http://cvs.sourceforge.net/viewcvs.py/*checkout*/moodle/moodle/lib/excel/Workbook.php?rev=1.2
[Martin told me to go ahead and make the change.]
Hi,
the same problem, but not fixed ..(I updated workbook.php)
textfile is ok
excel -> nothing
The Error message: "Error when copping the file" and "Cant read source ..."
Downloading grades works without problems ...
(1.3 latest nightly)
Thanks Peter
Hi,
1.) you are right, I use a unix server
2.) I will download mozilla und try it, you will get the report
Peter
- with mozilla it works without problems (PERFECT possibiilties for analysing results, congratulations!)
- wie IE (latest batch) and Excel 2003 /german
no result, it seams to be a problem with the tmp dir from ie ..., because also saving it to file does not work - But in grades it works with excel and ie (as a hint!)
Peter
header("Content-Disposition: attachment; filename=$course->shortname ".$quiz->name.".xls" );
This header requests that the browser store the downloaded Excel spreadsheet in a file whose name contains a space. I think this may be confusing IE and leading to your error. Try changing that line to
header("Content-Disposition: attachment; filename=$course->shortname".$quiz->name.".xls" );
that is delete the space after shortname.
I don't know if this is really the problem, since downloading Excel quiz reports does not give me this error with IE on my WinXP machine. However IE is quirky, mysterious and inconsistent, so this doesn't necessarily rule out the possibility that this is the cause of your error.
Another possibility is that there are strange characters in the shortname of the course where this error occurs, but this would also cause a similar error when downloading an Excel spreadsheet from the grades page of that course.
I deleted the spaces, but same result.
The course shortname = GMT-JG02-TFB1, this could not be the reason
BUT then I checked the Quiz Name:
- Aufgabe: Statistische Berechnungen (Überpruefung)
First I tried to change the name during saving, no result
But then I changed this in the quiz configuration to - Aufgabe-Statistische Berechnungen - Ueberpruefung
and this works. It is useless to change only the filename when saving, the quizname is the problem ...
I only eliminated the ":" and used again , (Ü) - a German char was not the problem in that case.
I hope this may help to solve the problem.
There are some contributes from me, describing problems with moodle and special chars. If you save an upload with an german special char, the server renames this to "_" and you have to download it by ftp, because the lnk is broken!.
Maybe there is a chance to get an routine, preventing some chars in saving and naming.
It is impossible to do this only with "teachers-law"
Thanks for help, I new now what to to ...
Correcting all Titles ...
Peter
My english is not very well,
but I hope this is correct: "you hit the bull's-eye", but why does it work with Mozilla???
Maybe there is a possibility to prevent using such names or better change it before using it in the routine?
Peter