importing problem

importing problem

by Jean-Pierre Pawlak -
Number of replies: 3
Importing a french .jqz into a Moodle quiz fails.
I'm getting the following error:

Could not insert quiz shortanswer options!
Error during processing!

Using :
Hot Potatoes version 6.0 release 4 Build 7
Moodle 1.5.2 + (2005060222)

Average of ratings: -
In reply to Jean-Pierre Pawlak

Re: importing problem

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Dear Jean-Pierre,

please could you send the jqz file across to me at:
gordon at-sign kanazawa hyphen ac dot jp

I would like to investigate the cause of the problem smile

many thanks!
Gordon

In reply to Gordon Bateson

Re: importing problem

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Jean-Pierre,
thanks for sending over the jqz file. I got the same error mesasge, in all its glory:

Notice: Undefined property: stdClass::$usecase in C:\ApacheFriends\xampp\htdocs\moodle\fontana\mod\quiz\questiontypes\shortanswer\questiontype.php on line 85

Column 'usecase' cannot be null

INSERT INTO mdl_quiz_shortanswer ( QUESTION, ANSWERS, USECASE ) VALUES ( 8, '8', null )

Could not insert quiz shortanswer options!

Error occurred during processing!

The problem was that the script which imports Hotpot quizzes into the standard Moodle quiz module did not set 'usecase' for JQuiz and JMatch quizzes. I modified the script and it seems to work now.

For your convenience, I have attached the modified import script to this message. Please download it, unzip it and put it in the following location on your Moodle site:
mod/quiz/format/hotpot/format.php

Please let me know how you get on smile

all the best!
Gordon