GIFT import error after upgrading from 1.9.3 to 1.9.7

GIFT import error after upgrading from 1.9.3 to 1.9.7

by Trevor Wallis -
Number of replies: 3
After upgrading from 1.9.3 (build 20081015) to 1.9.7 (build 20091126), the GIFT import fails, giving the following two messages:

Parsing questions from import file.
Cannot read import file (or file is empty)

When I turn on debugging, I get the following two additional lines:

Stack trace:
line 5795 of lib\weblib.php: call to debugging()
line 141 of question\import.php: call to print_error()

It appears that several other people have posted about similar issues, but I haven't seen any resolution. In many of the other posts, the following "usual suspects" are suggested:

Is the file using the correct (UTF-8) encoding? Yes. I have double-checked this.

Is the file formatted correctly? Yes. In fact the same file imports successfully in 1.9.3, thus demonstrating that both the format and the encoding are correct.

I have reduced the problem to a very simple form as I try to import just one question, formatted as follows:

Question{
~answer1
~answer2
~answer3
=correct answer}

Does anyone have any resolution to this issue?

Many thanks,

Trevor

Average of ratings: -
In reply to Trevor Wallis

Re: GIFT import error after upgrading from 1.9.3 to 1.9.7

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What came before the stack trace? You would normally see an error message closely followed by the trace. That would give a big clue.

GIFT hasn't changed in recent versions so it's doubtful it is directly related. Can you upload *any* files? Can you upload files to any other import export formats (try exporting and then importing XML Format)?

The most likely thing is a php.ini setting (the temporary directory for file uploads) and/or the permissions on the upload directory.

It's still worth attaching the file you are attempting to upload so we can check it - just in case.
In reply to Howard Miller

Re: GIFT import error after upgrading from 1.9.3 to 1.9.7

by Shawn Arrington -

I am having the same problem - exporting works fine, importing not so much.  I can upload plenty of other files (pictures, etc.) but can't import questions in any format.  I attached a sample file.

Moodle 1.9.7
Windows 2008
IIS
PHP 5.3
MySQL 5

In reply to Shawn Arrington

Re: GIFT import error after upgrading from 1.9.3 to 1.9.7

by Shawn Arrington -
Got it - changed the php.ini setting for the upload_tmp_dir to moodledata