I have a vocabulary list of a few hundred words in Dutch, English and French and I'm making a question bank out of that using the gift import filter for short answer questions. That works fine, as long as I only want one answer (say Dutch -> French, English -> Dutch, ...). But I can't find a solution for two short answers (Dutch -> English and French) in one question, because the cloze import filter apparently has nothing to devide an uploaded file into separate questions (all goes in one question).
Am I missing the obvious here on how to split an import file into multiple cloze questions? Is there a better way to reach my goal?
// Parses an array of lines into an array of questions.
// For this class the method has been simplified as
// there can never be more than one question for a
// multianswer import
Given that the Cloze syntax is not compatible with the GIFT syntax the available solution is to create individual cloze files.
However in this case a cut and paste through the Cloze question regular edit form could be perhaps easier than the import processing of numerous files.
Pierre
The regular edit form also generates only one question at the time, I think.
Have you a suggestion ?
Pierre
There is almost zero chance that this will be in the question text and I prefer this to blank lines or other simple separators. Everybody is using a text editor in which you can set this expression for a specific keyboard key combination or use cut and paste. Also when you are using an HTML editor it is very difficult to obtain a real newline mostly you will obtain <br /> or <div></div>.
These very consive Cloze, GIFT convention were often developped when "teletype" your text without any simple cut and paste.
The name has been shorten to 15 characters following the type/questiontype->save_question() code.
You can test it on Moodle Head at
http://132.208.141.198/moodle_head/
user : moodle pw:moodle
Pierre
I used this file:
aandachtspunt {1:SHORTANSWER:=point of interest}, {1:SHORTANSWER:=singularité}
//NEWCLOZEQUESTION
aandragen {1:SHORTANSWER:=put forward}, {1:SHORTANSWER:=avancer}
//NEWCLOZEQUESTION
aaneengesloten {1:SHORTANSWER:=uninterrupted}, {1:SHORTANSWER:=ininterrompu}
//NEWCLOZEQUESTION
aangeven {1:SHORTANSWER:=indicate}, {1:SHORTANSWER:=indiquer}
//NEWCLOZEQUESTION
aanleren {1:SHORTANSWER:=teach}, {1:SHORTANSWER:=apprendre}
Hello,
sorry to bring back this very old thread.
I have updated Pierre's version (the one using the //NEWCLOZEQUESTION separator) to work with actual Moodle versions) and as I have done it, as well share it with you
It install as a new question import format plugin (qformat_multianswers) rather than replace the existing one (qformat_multianswer) because I don't like to patch Moodle but of course the choice of the name with only one character added was a very bad idea !
In fact I think all this work was a bad idea: as Miroslav suggested it would have been a lot better to modify the program creating these questions to export a Moodle XML file in the first place, rather than creating this qformat_multianswers plugin, but it was done very quickly and it was working, so I was lazy to redo it the right way
Just in case it can be useful to somebody else I attach it to this message but I will certainly not bother to submit it to the Plugins directory.
Jean-Michel "In fact I think all this work was a bad idea..."
Well, maybe it was not such a good idea but we all know it originated from your goodwill to service the Moodle community. And for that we are grateful.
I wish you a Happy New Year 2014, which of course will be full of goodwill and good ideas!
Joseph
It is available at
http://132.208.141.198/moodle_head_exp/
user: moodle pw: moodle
Going to give it a try!
Do you have access to the code so you can change yourself the format.php file?
Pierre
I will put it (CVS) after Howard comments.
Pierre
//NEWCLOZEQUESTION put in an independent line
I will CVS probably tonight. (and also put the corrected format file on the tracker).
I will also trim the question name to shorter one (30-40 car max)
12345678901234567890123456789012345678901234567890
Pierre
Dear Pierre, Koen and other Moodlers
I'm trying to upload multiple questions with dropdown options and for the past 48 hours have been drawing blanks!
It keeps putting all the questions under the same question.
I've tried placing //NEWCLOZEQUESTION between each question to try to separate the questions, alas no joy.
I guess you might recommend XML but that's going to be tricky for me too.
Anyone's help is greatly appreciated, especially in plain English
Bobby