New quiz module code in Moodle 1.5 alpha

Re: New quiz module code in Moodle 1.5 alpha

by James Depow -
Number of replies: 3
Hi,

It appears I do have the correct script in my moodlelib.php. It reads:


/**

* The clone keyword is only supported from PHP 5 onwards.
* The behaviour of $obj2 = $obj1 differs fundamentally
* between PHP 4 and PHP 5. In PHP 4 a copy of $obj1 was
* created, in PHP 5 $obj1 is referenced. To create a copy
* in PHP 5 the clone keyword was introduced. This function
* simulates this behaviour for PHP < 5.0.0.
* See also: http://mjtsai.com/blog/2004/07/15/php-5-object-references/
*
* @param object $obj
* @return object
*/
if(!check_php_version('5.0.0')) {
// the eval is needed to prevent PHP 5 from getting a parse error!
eval('
function clone($obj) {
return $obj;


Does the fact that I am using Easyphp 1.8 (which has version 4.3.10 of php) contribute to this error?

I have attached the zip file that I tried to import.  It was created from a quiz using Examview in webct 3.x zip format.

I will post to the bug tracker.

Jim
In reply to James Depow

Re: New quiz module code in Moodle 1.5 alpha

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I cannot reproduce your WebCT problem! Your file loads fine for me. Do you have any more information that might help me to reproduce your problem.
In reply to Howard Miller

Re: New quiz module code in Moodle 1.5 alpha

by James Depow -

Hi Howard,

These are the error messages when I click Import questions from file:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of addslashes(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in c:\program files\easyphp1-8\www\moodle\mod\quiz\format\hotpot\format.php on line 405
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in c:\program files\easyphp1-8\www\moodle\mod\quiz\format\qti2\format.php on line 269

The questions are from a pool of questions available through the publisher using Exam View and exporting to file.  I have imported WebCT formated questions into my production site successfully, but I am having problems doing so now, aas I get an error stating there are no quesyions.  Not sure what I am doing wrong.

I exported a quiz from my production site in Gift Format and tried improrting that file into the 1.5 version on my laptop.  I received the following errror:

 Fatal error: Call to undefined function: splot_truefalse_comment() in c:\program files\easyphp1-8\www\moodle\mod\quiz\format\gift\format.php on line 334

I have attached the txt file.  is this of any help?

Jim

In reply to James Depow

Re: New quiz module code in Moodle 1.5 alpha

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Again, works for me. Except that the file has
 tags wrapped around it. You have to be a bit careful about this, as the file display function sees it as a text file and adds these in. The undefined function was a typo and is fixed. 

Strangely, you one of your warnings refers to the Hotpot format and the other to the qti 2.0 import. Neither are webCT??