A "bug" after the questions import....

A "bug" after the questions import....

ved C P -
Antal besvarelser: 14
Hello everyone,

I'm using Moodle 1.9.4+ (Build: 20090429).
When I try to import some multiple choices questions from the GIFT format, the first question is not imported and of course doesn't appear in the quiz.
This bug only appears when all the questions are of the same kind (for example : only multiple choice, or only true/false).
But if the first question isn't of the same kind as the others, it works...

Any idea ?

Thanks sourire
Gennemsnitsbedømmelse: -
I svar til C P

Re: A "bug" after the questions import....

ved Howard Miller -
Billede af Core developers Billede af Documentation writers Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers
Almost certainly the editor you are using. Some break the files by adding a thing called a BOM at the beginning. Quick fix... use (specifically, save with) a different text editor.
I svar til Howard Miller

Re: A "bug" after the questions import....

ved C P -
I saw the editor needs to use UTF-8 format, that's why I'm using Notepad++.
Is it possible to use the Notepad included in Windows and make it use UTF-8 ?
I svar til C P

Re: A "bug" after the questions import....

ved Nadav Kavalerchik -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators
Do you have an empty line between each question ?
I svar til Nadav Kavalerchik

Re: A "bug" after the questions import....

ved C P -
Yes there is an empty line between each question.
The questions are made in one line. (1 line for each)
I svar til C P

Re: A "bug" after the questions import....

ved Joseph Rézeau -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators
Christophe,
The easiest way for us to help you is for you to attach your MCQ GIFT import file to your post so we can examine it.wink
Joseph
I svar til Joseph Rézeau

Re: A "bug" after the questions import....

ved C P -
I'm trying to resolve the problem found by a user of the blackboard, so I'll ask him to give me the file. As soon as I get it, I'll share it. Thanks
I svar til Joseph Rézeau

Re: A "bug" after the questions import....

ved C P -
Here is the test file smiler
I svar til C P

Re: A "bug" after the questions import....

ved Joseph Rézeau -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators

Christophe,

Your GIFT test file was encoded as UTF-8(BOM), which causes problems upon importing into Moodle.

Using one of the many "advanced" text editors available on the Internet, (the excellent UniRed), I was able to a) detect your BOM encoding and save it with a new UTF-8 (non BOM). I am attaching the correct file.

It would have been easier to understand your sample file if not all the questions had been exactly the same.wink

Joseph

PS.- For more info about that silly UTF-8(BOM) problem, see Problems with Swedes: Uploading users via text/csv and also Display problems caused by the UTF-8 BOM

Gennemsnitsbedømmelse:Useful (1)
I svar til Joseph Rézeau

Re: A "bug" after the questions import....

ved C P -
Any hint ??
I svar til C P

Re: A "bug" after the questions import....

ved Nadav Kavalerchik -
Billede af Core developers Billede af Plugin developers Billede af Testers Billede af Translators
i think it is because you are using a Windows file format.
the file you attached uses "END OF LINE" Windows format.
it should not.

do you use Notepad++ ? it has UNIX file format feature as well as UNICODE (UTF-8) encoding. both, are needed to be set if you are uploading text files into Moodle.

i am attaching a working example.

btw, your GIFT format is fine. as far as i can tell (tested on Moodle 1.9.4)

smiler
I svar til Nadav Kavalerchik

Re: A "bug" after the questions import....

ved C P -
Yes I use Notepad++, i'll try to set it to UNIX format.

I'll give a feeback soon.

Thanks a lot !