importing cloze questions into 1.9

importing cloze questions into 1.9

Tom Semmler發表於
Number of replies: 10

Hi,

I have the following problem when importing cloze questions in Moodle version 1.9:

The imported questions show up fine in my Moodle course. However, when I open the question edit window in Moodle to change  or add something all the imported formatting disappears and I have to reformat the question in the edit window.

Is there any way to avoid this?

Thank you for any suggestions.

Tom

 

評比平均分數: -
In reply to Tom Semmler

Re: importing cloze questions into 1.9

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

@Tom,

Unfortunately you do not say where or how you import your cloze questions from. Please attach your import file to your reply so we can examine it.

Joseph

In reply to Joseph Rézeau

Re: importing cloze questions into 1.9

Tom Semmler發表於

Hi Joseph,

Sorry about that. Since the import worked fine I didn't think of attaching the file. Here it is.

Thanks for your help

Tom

In reply to Tom Semmler

Re: importing cloze questions into 1.9

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

Hi Tom,

Thanks for attaching your import file. I'm afraid you've got it all wrong. Please read the instructions for GIFT to Cloze here: http://docs.moodle.org/22/en/Embedded_Answers_%28Cloze%29_question_type#Importing_CLOZE_questions

Joseph

In reply to Joseph Rézeau

Re: importing cloze questions into 1.9

Tom Semmler發表於

Hi Joseph,

If I've got it all wrong so does the example you refered me to. I does exactly the same thing as my imported file: it keeps the formatting until I open the quiz editing window, then the formatting disappears.

Any other suggestions?

Cheers

Tom

In reply to Tom Semmler

Re: importing cloze questions into 1.9

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

Hi Tom,

Sorry, I should have tested the Docs solution myself before referring you to it.臉紅

Will do it ASAP and report here.

Joseph

In reply to Tom Semmler

Re: importing cloze questions into 1.9

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

HI Tom, I'm back... Since I never import Cloze questions into Moodle I had completely misunderstood your question. PLease disregard my earlier replies.

Now, coming back to your original question, I do understand it and I do see the problem.

I'm afraid this happens because the carriage return characters that you put into you original imported file are re-interpreted (and... lost) when the Cloze question is edited in the HMTL editor. So you'll have to put them in again, from within the HTML editor. Boring, but that's the only solution I can think of.

Joseph

In reply to Joseph Rézeau

Re: importing cloze questions into 1.9

Tom Semmler發表於

Hello Joseph,

Thanks for taking the time to check it out. I have been doing what you suggest but, as you point out, it's somewhat of a bore. I was hoping there might be a rather less boring solution.

Thanks again

Tom

In reply to Tom Semmler

Re: importing cloze questions into 1.9

Jean-Michel Védrine發表於

Hello Tom and Joseph,

Apparently Joseph is not the only one never having used multianswer (cloze) question import because I just tested and multianswer import format seems to be broken in Moodle 2.2 and master (and maybe 2.1 too) and it seems nobody has reported it or asked for support in this forum 大眼睛 !!

Unfortunately once this small problem is fixed, the problem is exactly the same in Moodle 2.2/2.3 : all formatting is lost when you edit the cloze question. Apparently the question text is considered as html and end of line are equivalent to space in html.

So maybe a solution for you Tom would be to use a text editor and search/replace on your text file before importing it into Moodle and add a <br /> html tag before each end of line ? I have tested this solution and it seems to work.

I will create an issue in the tracker to fix multianswer import format in Moodle 2.2/2.3.

In reply to Jean-Michel Védrine

這一討論區的貼文已經被移除

這一討論區的貼文已經被移除且無法再被存取
In reply to Jean-Michel Védrine

Re: importing cloze questions into 1.9

Tom Semmler發表於

Hello Jean-Michel,

Great, that does the job. Thanks very much Jean-Michel and have a nice day.

Tom