GIFT importing quiz as one question

GIFT importing quiz as one question

написао/ла Jay Melton -
Број одговора: 17
Hello:

I am still having troubles importing GIFT quizzes in 1.8.2+. When I import the attached quiz (11 questions), they import as one question. My installation is Unicode and the file is Unicode.

Any advice?

Jay
У одговору на Jay Melton

Re: GIFT importing quiz as one question

написао/ла Thomas Robb -
It imported fine for me after:

1) I unchecked the box that says "Stop on error" because for some reason the import was insisting that there was an unmatched "{", and

2) I opened it up and then saved it with DOS line returns (rather than Mac). There was a point very early in Moodle's history, 1.4 or before where the import function wasn't sensitive to Mac line feeds. That was fixed, but it could well be that someone forgot to implement it in the current version -- especially if they normally work and test on Windows only.

I hope this helps!
У одговору на Thomas Robb

Re: GIFT importing quiz as one question

написао/ла Howard Miller -
Слика Core developers Слика Documentation writers Слика Particularly helpful Moodlers Слика Peer reviewers Слика Plugin developers
FWIW.... I use a Mac all the time and have *never* had any encoding issues at all. It does seem to be the number one problem with failed imports.
У одговору на Howard Miller

Re: GIFT importing quiz as one question

написао/ла Joseph Rézeau -
Слика Core developers Слика Particularly helpful Moodlers Слика Plugin developers Слика Testers Слика Translators
Hi Howard,
How do you explain the presence of the \u2028 encoding for Line Separator in the file posted by Jay? Anything to do with the Mac?
Can Jay explain?
Joseph
У одговору на Joseph Rézeau

Re: GIFT importing quiz as one question

написао/ла Howard Miller -
Слика Core developers Слика Documentation writers Слика Particularly helpful Moodlers Слика Peer reviewers Слика Plugin developers
Dunno...

But it's a bit of an oversimplification to blame the mac. Your question stands, which application on the Mac? A lot of people create stuff in Word and copy and paste. That is often the kiss of death for these things as Office applications have weird encodng.

I'd certainly be interested to know if it turns out to be OSX TextEdit or suchlike as I'd want to add some advice about that to the Docs.
У одговору на Howard Miller

Re: GIFT importing quiz as one question

написао/ла Joseph Rézeau -
Слика Core developers Слика Particularly helpful Moodlers Слика Plugin developers Слика Testers Слика Translators

Oh, I wasn't blaming the Mac. tongueout

"A lot of people create stuff in Word and copy and paste." Yes indeed, I have often warned moodlers against doing that. You are right, which application was Jay using is what we want to know. In my first message I was recommended UniRed, a freeware text editor which clearly shows all the various encodings of a text. It's only for Windows. Maybe you can suggest something similar for the Mac?

Joseph

У одговору на Joseph Rézeau

Re: GIFT importing quiz as one question

написао/ла Howard Miller -
Слика Core developers Слика Documentation writers Слика Particularly helpful Moodlers Слика Peer reviewers Слика Plugin developers
The best editor is probably SubEthaEdit, but they charge money for that these days.

To be honest, I usually pop up a terminal window and use Vi. Just showing my age I guess смешак
У одговору на Howard Miller

Re: GIFT importing quiz as one question

написао/ла Joseph Rézeau -
Слика Core developers Слика Particularly helpful Moodlers Слика Plugin developers Слика Testers Слика Translators
Howard > I usually pop up a terminal window and use Vi.

No idea what this means. Just showing my own age (and my devotion to Windows's GUI).clown

Joseph

У одговору на Jay Melton

Re: GIFT importing quiz as one question

написао/ла Joseph Rézeau -
Слика Core developers Слика Particularly helpful Moodlers Слика Plugin developers Слика Testers Слика Translators

Hello Jay,

Don't know which software you used to produce your ic1.gift.txt file, but when I inspect it with the (excellent) UniRed text editor, it shows strange formatting (see attached screen shot from UniRed text properties). I saved it as UTF-8 (no BOM) and Line Separator CR LF and could import it without any problem into my moodle 1.8.2 installation.

Joseph

Прилог image00.jpg
У одговору на Joseph Rézeau

Re: GIFT importing quiz as one question

написао/ла Jay Melton -
Hi Joseph (and others),

Sorry I haven't followed up on this yet; the need to create a new quiz hadn't come around yet. The settings turned out to be the culprit.

I am using Mac OS X and the Freeware TextWrangler for my quiz creation (and other text chores). I used UTF-8, noBOM and Windows CRLF and the quiz imports just like the old days.

Thanks a bunch for writing me through this! велики осмех

Jay

P.S. Note to those working on the quiz module: you might want to allow for Unicode line breaks since this seems to be more intuitive for those of us coming from other platforms. All of the documentation and forum messages say to use Unicode, so it's weird that Windows is involved here.

У одговору на Jay Melton

Re: GIFT importing quiz as one question

написао/ла Howard Miller -
Слика Core developers Слика Documentation writers Слика Particularly helpful Moodlers Слика Peer reviewers Слика Plugin developers
You might want to create a bug report in the tracker (tracker.moodle.org) and post an example file.

To be honest, I'm none too familiar with what's involved with Unicode line breaks. This might turn out to be like the Unicode BOM thing which is nearly impossible to detect effectively.

EDIT:

Mmmm.... reading:


http://en.wikipedia.org/wiki/Newline

It sounds as though Unicode accepts almost anything.

I've created a report:
http://tracker.moodle.org/browse/MDL-11780
У одговору на Howard Miller

Re: GIFT importing quiz as one question

написао/ла Jose Trompiz -

Hi Howard.

I have a trouble with a quiz. After I finish of prepare it, I try to see and I only get a White screen, I can't see a preview. I have moodle 1.8.2, instaled over windows2003 server.

Could you help with this?

Thank

Jose Trompiz

У одговору на Jose Trompiz

Re: GIFT importing quiz as one question

написао/ла Jay Melton -
Hello Jose,

I'm not sure you are going to get help by posting a question in a thread on a different question.

Can you create a new thread with a clear subject, and be very specific on what you did and what the problem is? For example, how did you prepare the quiz? How did you upload it? At what stage does the white screen appear?

I hope your problem gets solved. The people here are very helpful if you help them figure out what is going on.

Jay
У одговору на Jay Melton

Re: GIFT importing quiz as one question

написао/ла Jay Melton -
Hello all:

Thanks a bunch for all the info! You all are great! Yes, I am using a Mac with the latest OS X to create the files. I know this has to be a file format issue because I never had GIFT import problems before the switch to unicode (I have been using moodle since 1.2 and GIFT since 1.4).

To create the above GIFT file, I first used BBEdit (on a 30-day demo mode). Yesterday, the trial ran out, so I switched back to TextWrangler (Barebones' free version of BBEdit). I have never used a word processor like MS Word to create GIFT files. If my text editors are adding useless code, then I need to find another editor. Suggestions?

The settings for the attached file are:
--Unicode (UTF-8) [I did not use UTF-8, no BOM; should I change that?]
--line breaks are set for Unicode [TextWrangler offers Mac (CR), Unix (LF), Windows (CRLF), and Unicode; which is preferable?]

Last semester, I forgot about the Unicode issue and uploaded a few quizzes with Mac encoding and got UTF-8 error messages on the Server/Environment page. I deleted the entire moodle package and database and started with a clean install this semester.

I had to copy and paste two quizzes like the one I attached above for my course this morning (that took about an hour!) I love the GIFT format, so any advice on settings or recommended Mac editors is greatly appreciated!

Jay
У одговору на Jay Melton

Re: GIFT importing quiz as one question

написао/ла Jake Atencio -
I know this topic hasn't been addressed lately, but with the info I found here and a little experimenting I found a solution that worked for me today when I was having this problem.

Using TextWrangler (Mac), which I originally had set to UTF-8, I couldn't get my questions to upload properly. However by choosing [Text] - [Convert to ASCII] from the menu, I immediately noticed that certain characters changed, such as an ellipsis becoming three periods. After saving the file, my questions uploaded without any further problem.

Hope this helps other who are having trouble importing their questions using GIFT.
У одговору на Jake Atencio

Re: GIFT importing quiz as one question

написао/ла Jay Melton -
Hi Jake,

Please be careful to use Unicode for the text encoding. I did the tweaking (into Western Mac OS Roman using TextWrangler) I wrote about above, and GIFT files loaded okay, but it corrupted my moodle installation. Go to
  • Administration
  • / Server
  • / Environment
to make sure you're still okay with unicode.

Jay
Прилог Picture_1.png