Importing GIFT questions - limit?

Importing GIFT questions - limit?

by Chris Swaffield -
Number of replies: 9
Is there a limit to the number of questions, in GIFT format, that Moodle will import? I have a file of 50 questions, but it will import the first 21 and then just stop. The error message just says "can not import question." Thanks in advance.
Average of ratings: -
In reply to Chris Swaffield

Re: Importing GIFT questions - limit?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Chris,

No there is no limit to the number of questions. Most likely the reason why your import stops is the presence of some "special" character in your GIFT file. If you can post it here maybe we can examine it and tell you what's wrong.

Joseph

In reply to Joseph Rézeau

Re: Importing GIFT questions - limit?

by Chris Swaffield -
Thanks for the reply, Joseph.

Here is the file. What I ended up doing is going through the first 23 and creating a new file with the rest, uploading it as a separate set. I'd rather not do that again! It was failing after the first two or three questions on page 4. Thanks for the help.
In reply to Chris Swaffield

Re: Importing GIFT questions - limit?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Oops! There's no way a GIFT file can be a Word *.doc file! It must be a plain text file... On top of that, your word document has formatting in it (bold, page numbers, hyperlinks, etc.) No wonder it would not import... Please remember that a GIFT file must be a plain text file with no formatting in it whatsoever...wink

Joseph


In reply to Joseph Rézeau

Re: Importing GIFT questions - limit?

by Chris Swaffield -
Joseph - Yes, I know! I apologize for sending you the .doc file. SInce were looking for errant characters, I thought that would be the best file for you to look at. Again sorry.

What I did was save that file you looked at as Text Only. The resulting .txt file is what I loaded to Moodle for the questions.

Re: Bold - I don't understand why bold is a problem. Of all those questions, 49 have imported with the bold still present.

Re: page numbers - Forgot about that!

Re: hyperlinks - Yep, missed it.

Thanks for the help. I'll retry without those. I'm curious, did youjust look at it or try to import it? I wonder if you had same results on import. Thanks again.
In reply to Chris Swaffield

Re: Importing GIFT questions - limit?

by John Isner -
After you convert the Word doc to a text file, here's a suggestion on uploading GIFT files in the future.

Always upload into a special empty category that you use only for uploading (let's call it category NEW). That way, if there are errors, you can just delete all the questions in NEW (Select all -> Delete), fix the errors in the GIFT file, and upload the entire file again. No need to split the file into pieces! Keep doing this until the entire file loads without error. Then reclassify all your questions into their proper categories, leaving the NEW category empty and ready for you to upload your next GIFT file.
Average of ratings: Useful (1)
In reply to John Isner

Re: Importing GIFT questions - limit?

by Chris Swaffield -
Thanks. John. Essentially that was what I was doing with this situation. I must have deleted the questions ten times!

I think Joseph is on to something with the page numbers. Something, I totally missed. It makes sense, too, since the Moodle screen showed that it stopped at an area of a page break and displayed "page 1 of 8" above the questions it imported. Thanks again.
In reply to Chris Swaffield

Re: Importing GIFT questions - limit?

by Deleted user -

This is the question that has the problem (on page 4):

You've heard of "Identity Theft" but don't think it will happen to you. Is it okay to give out your payment information without checking first that the Internet connection is secure? (2.a.2) {
~ Yes
= No}

For some reason, (see the highlighted words above) the single quotes (') and the double quotes (") you used, are not the standard single and double quotes, and are causing the problem. They have a different character string number. I don't know how they got there though!!!

I simply went into Wordpad, and replaced them with the the single and double quote to the left of my ENTER key, and then it imported fine!

In reply to Deleted user

Re: Importing GIFT questions - limit?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This is a *very* common problem in data exported from Word. It's because Word substitutes "proper" quotes with what it calls "Smart Quotes". The best thing to do is to simply turn this feature off. Here's how:

1. On the Tools menu, click AutoCorrect Options, then click the AutoFormat As You Type tab.
2. Under Replace as you type, select or clear the "Straight quotes" with "smart quotes" check box.

Automatically deleting the questions in a failed import is something I keep meaning to add. I'll put in a bug report to remind myself smile

EDIT:
http://tracker.moodle.org/browse/MDL-8838