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
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!
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
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.
Oh, I wasn't blaming the Mac.
"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
To be honest, I usually pop up a terminal window and use Vi. Just showing my age I guess
No idea what this means. Just showing my own age (and my devotion to Windows's GUI).
Joseph
You need to look at the following to make your life better......
http://www.cygwin.com/
....or just load Linux on your desktop!
P.S.:
http://www.vim.org/download.php#pc
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


Anyway, attached is the "correctly" formatted file. Oh, are you working on a Mac?
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.
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
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
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
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
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.
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
Jay
