Importing Cloze type of questions from file.

Importing Cloze type of questions from file.

by Ruslan Kabalin -
Number of replies: 6
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Peer reviewers Picture of Plugin developers

Hello!

Will you please explain me how to format the importing file to set the begining and the end of the questions. Problem is that after importing the questions for the Cloze type of questions (syntax is right, all my questions looks like I planned), I have only one questions with all content of my file.

Thanks

Ruslan 

Average of ratings: -
In reply to Ruslan Kabalin

Re: Importing Cloze type of questions from file.

by Dennis Daniels -
Can you include a sample of the formatting please?
thanks!
Dennis
In reply to Dennis Daniels

Re: Importing Cloze type of questions from file.

by Ruslan Kabalin -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Peer reviewers Picture of Plugin developers

Of course I can.

Thank you.

In reply to Ruslan Kabalin

Re: Importing Cloze type of questions from file.

by Bernard Boucher -
Hi Ruslan,
that type of question don't support multiple differents Cloze questions in one file. All questions in the same file are treated as one big Cloze question.

In mod/quiz/format/multianswer/format.php you will see:

/// 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

If you want many cloze questions, split your file as required.

I hope it may help.

Bye,

Bernard

In reply to Bernard Boucher

Re: Importing Cloze type of questions from file. 1.4.2 (almost)

by Dennis Daniels -
I'm having trouble importing cloze as well... in fact I used the sample cloze format and it too failed.
Here's the sample provided with errors:

Everyone in the bank-including the manager and the tellers, ran to the door when the fire alarm rang. . Why did you pick this answer? {1:SHORTANSWER:~#No credit for blank answers=} icon.gif delete.gif search.gif edit.gif
This question consists of some text with an answer embedded right here _____ and right after that you will have to deal with this short answer {1:SHORTANSWER:Wrong answer#Feedback for this wrong answer~=Correct answer#Feedback for correct answer~%50%Answe icon.gif delete.gif search.gif edit.gif
Note that addresses like www.moodle.org and smileys smile all work as normal: a) How good is this? b) What grade would you give it? {3:NUMERICAL:=3:2}

This question consists of some text with an answer embedded right here {1:MULTICHOICE:Wrong answer#Feedback for this wrong answer~Another wrong answer#Feedback for the other wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer} and right after that you will have to deal with this short answer {1:SHORTANSWER:Wrong answer#Feedback for this wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer} and finally we have a floating point number {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8~%50%N/A#Feedback for halfcredit answer in the nearby region of the correct answer}.

Note that addresses like www.moodle.org and smileys smile all work as normal:
a) How good is this? {:MULTICHOICE:=Yes#Correct~No#We have a different opinion}
b) What grade would you give it? {3:NUMERICAL:=3:2}

Good luck!

-----------------------------------
Here's my own with the error message:
Everyone in the bank-including the manager and the tellers, ran to the door when the fire alarm rang.
{1:MULTICHOICE:~tellers, ran
~tellers:ran
~tellers, had run
=tellers-ran#The right answer was tellers-ran. Hyphens set off the subordinate clause
~tellers ran}. Why did you pick this answer? {1:SHORTANSWER:~#No credit for blank answers=}

Warning: Invalid argument supplied for foreach() in /home/jmcgarve/public_html/online/mod/quiz/questiontypes/multianswer/questiontype.php on line 190

1

spacer.gif


Everyone in the bank-including the manager and the tellers, ran to the door when the fire alarm rang.
{1:MULTICHOICE:~tellers, ran
~tellers:ran
~tellers, had run
=tellers-ran#The right answer was tellers-ran. Hyphens set off the subordinate clause
~tellersâ ranâ}. Why did you pick this answer? {1:SHORTANSWER:~#No credit for blank answers=}


In reply to Dennis Daniels

Re: Importing Cloze type of questions from file. 1.4.2 (almost)__working example

by Dennis Daniels -
Ok, got it working... but the results are not satisfactory...
Here's a working example of a cloze question:
-----------------------
Everyone in the bank-including the manager and the tellers, ran to the door when the fire alarm rang.
{1:MULTICHOICE:tellers, ran
~tellers:ran
~tellers, had run
~=tellers-ran#The right answer was tellers-ran. Hyphens set off the subordinate clause
~tellers ran}. Why did you pick this answer? {1:SHORTANSWER:=}
--------------

Preview question

spacer.gif

Everyone in the bank-including the manager and the tellers, ran to the door when the fire alarm rang.
tellers, ran tellers:ran tellers, had run tellers-rantellers "ran". Why did you pick this answer?



----------
but the answers in the dbase  don't show either of the responses:

test test

OverviewRegrade attemptsDetailed statisticsSimple statistics

Responses of Individuals to Each Item
NameGradeQ-1
Dennis Daniels  0%    --  
Dennis Daniels  0%    --  

 

Item Response Analysis
Question:Q-1
Correct Response: 
Percent Correct:0
help.gif Discrim. Index:0 (0/0)
QUIZ: test test   --   Listing of Items in Quiz
Q-1Everyone in the bank-including the manager and the tellers, ran to the door when the fire alarm rang. {#1}. Why did you pick this answer? {#2}

The question part works but neither the short answer input or the drop down answers. This is unfortunate... is any having luck out there with CLOZE data collection?

dgd

In reply to Dennis Daniels

Problems with cloze type questions

by Pablo Lachmann -

Hi all,

sorry I can not provide a solution either. I've got the same problem, too. I've been searching the forum but I haven't found an answer to it yet. I did not use any import functionality, just typed the question into the text editor area.

I get only two red dashes, even if the answer was correct.

detailed_stats.jpg

Aside from that problem, 'Simple Statistics' is not displaying anything, but it does not seem to work at all in 1.4.3.

simple_stats.jpg

Is there a proper way to disable cloze type questions? I do not necessarily need them, but I don't want anyone to use them and get no results. :o}

Gruesse, Pablo