Errors importing questions in moodle xml format

Errors importing questions in moodle xml format

by Viil Lid -
Number of replies: 2

Hi,

I have encountered problems importing quiz questions from a file in moodle xml format to my newly installed Moodle 2.2 instance (would have liked to run the newest version of Moodle, but the server space I have doesn't offer the required MySQL version).

I have read about similar issues in the forum and worked throug the following:

  • made sure the file is in utf-8 format
  • increased my php memory (as I inittially got memory limit errors)

Now I am getting the following error message (I have replaced my server root path with [my root]):

-------------------------------------------------------------------------

Notice: Undefined index: quiz in [my root]/moodle/question/format/xml/format.php on line 923

Warning: Invalid argument supplied for foreach() in [my root]/moodle/question/format/xml/format.php on line 923

There are no questions in the import file
Stack trace:
  • line 435 of /lib/setuplib.php: moodle_exception thrown
  • line 121 of /question/import.php: call to print_error()

-------------------------------------------------------------------------

The moodle xml question file was supplied with my course text book from the publishing company. Am I correct to suspect that this error is caused by their question data being incomplete in the moodle xml file?

I'm greatful for any feedback regarding this.

Thank you,

Viil

Average of ratings: -
In reply to Viil Lid

Re: Errors importing questions in moodle xml format

by Jean-Michel Védrine -

Hello,

Most probably this is not a Moodle xml file but another kind of xml format (there are many xml formats for questions !). Does the publisher really say it is a Moodle xml format file ?

I guess copyright issues prevent you from uploading this file here. But without looking at the file content, it is impossible to say what kind of xml fomat it is and if it is possible to import it.

 

In reply to Jean-Michel Védrine

Re: Errors importing questions in moodle xml format

by Jean-Michel Védrine -

Here is the begining of some XML files format that I know:

Moodle XML
<?xml version="1.0" encoding="UTF-8"?>
<quiz>

Blackboard questions pool
<?xml version='1.0' encoding='utf-8'?>
<POOL>

Blackboard QTI format
<?xml version="1.0" encoding="UTF-8"?>
<questestinterop>

Old versions of Examview software
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<examview type='test' platform='Windows' app-version='4.0.2'>

WebCT Vista
<?xml version="1.0" encoding="ISO-8859-1"?>

<questestinterop
xmlns="http://www.imsproject.org/question"
xmlns:webct="http://www.webct.com/IMS">