Cloze MULTIANSWER problem

Cloze MULTIANSWER problem

by Steven Ouellette -
Number of replies: 17
OK here is a weird one...

I am setting up a multianswer question in cloze as a way to get a drop-down choice. (With 20 different choices the usual multiple choice wouldn't work.) I have some experience with Moodle cloze, so it should be straightforward. But I keep getting the error "Error: Missing question options for multichoice question155!"

Well I know it is easy to mess up the syntax, so I started to delete answers until I was left with only two, and still had the same error. So I copied the syntax from the help and tried that - with the same error! I have checked to make sure the text is clean in HTML view.

Here is the question text as it stands now...

test

{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}


If I change it to type SHORTANSWER (since it is the same syntax) it has no problems. Also, if I use the decode and verify button, it is able to parse it for that (see below). I get the error when I try to save the question, and then once saved, if I try to view the question. Using Moodle 1.9 + (Build: 20080325)

Any help??? Thanks!

Decode and verify output:

subquestiontext

Average of ratings: -
In reply to Steven Ouellette

Re: Cloze MULTIANSWER problem

by Stefan Eberhard -
I tested

{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}

No problems, even with the link in Feedback!

I had similar problems with Cloze, not knowing the reason. Even after deleting all answers, there was trouble. So I deleted the questions from the database, created new ones and it worked.



In reply to Stefan Eberhard

Re: Cloze MULTIANSWER problem

by Steven Ouellette -
Thanks for testing Stefan!

Do you have the same version? Maybe I need to update...
In reply to Steven Ouellette

Re: Cloze MULTIANSWER problem

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
i have the same issue with the same version

thou, old quizzes does not seem to break and still work
it is just that... i am unable to add new ones with the same syntax ?
funny.

i am upgrading to latest 1.9.2 right now and i hope this will resolve itself smile

In reply to Nadav Kavalerchik

Re: Cloze MULTIANSWER problem

by Steven Ouellette -
Hi Nadav, let me know if that works - I am going to try it too.

What is weirder is that I have another website with the same version of Moodle and no problems adding Cloze questions.

I hope the upgrade fixes it...
In reply to Steven Ouellette

Re: Cloze MULTIANSWER problem

by Pierre Pichet -

Hi Steven,

Some work has been done on cloze questions in june, so a more recent version should correct the problem.

Pierre

In reply to Pierre Pichet

Re: Cloze MULTIANSWER problem

by Steven Ouellette -
Bonjour Pierre!

I upgraded to the current weekly build Moodle 1.9.2 (Build: 20080716) and have the identical problem.

HOWEVER I have found the problem!!!

I am using REGEXP and have added the modified questiontype.php to /question/type/multianswer, and that is the source of the problem. Using the default questiontype.php in that directory yields no issue.

I tried to modify questiontype.php to work, and while I can get the normal Cloze questions to work, I cannot get REGEXP questions to work. This is because I code like a monkey as I don't really understand what I am doing and just copy/paste and try to match syntax.tongueout



I also see elsewhere (http://moodle.org/mod/forum/discuss.php?d=38542) that you are doing some arcane changes to REGEXP, but I can't tell if this involves REGEXP in Cloze, because, again, I am only a very early evolutionary stage of a code primate.

So, is there currently a solution at this point to make REGEXP work in Cloze?

Thanks!
In reply to Steven Ouellette

Re: Cloze MULTIANSWER problem

by Pierre Pichet -

The regexp code has to be modified.I will post a solution on return from my holydays around mid-august

Pierre

In reply to Steven Ouellette

Re: Cloze MULTIANSWER problem

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Steven,
Please update your modified /question/type/multianswer/questiontype.php file with the latest version available for 1.9 in order to be able to use the REGEXP question type inside Cloze questions.
From Question Type: Regular Expression Short Answer: Download modified question/type/multianswer/questiontype.php for moodle 1.9
and report here any success (or failure).
Joseph
In reply to Joseph Rézeau

Re: Cloze MULTIANSWER problem

by Steven Ouellette -
Hello Joseph,

First, I love REGEXP - I have used it in a couple of courses now. Thanks very much for it.

Yes, that is the modified questiontype.php I was using. I did a "Compare" on that and the current Moodle core questiontype.php and there is a lot of stuff in the new one that is missing from your modified one, as well as changes in variables and things. Perhaps it is possible that changes had been made since you made your modifications to it? The date in the header for your modified file is 2008/02/18 while the date in the header in the current core questiontype.php is 2008/06/19 (assuming these dates are edit dates).

Like I said above, I tried to monkey-fix the current release one to add in the stuff that it looked like you added, but the best I can do is break REGEXP while MULTICHOICE works. The worst is that nothing works.tongueout
In reply to Steven Ouellette

Re: Cloze MULTIANSWER problem

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Steven,
Let's make sure which files we are talking about first of all...
Are you taking about the REGEXP file (in moodle/question/type/regexp/questiontype.php) dated 2008/04/08?
Or are you taking about my modified cloze question type file (downloadable from the modules and plugins page, page Question Type: Regular Expression Short Answer read this line:
Download modified question/type/multianswer/questiontype.php for moodle 1.9

From your message I don't think you are using the very latest version of that file (timestamp: <?php // $Id: questiontype.php,v 1.41.2.10 2008/06/19 01:46:16 pichetp Exp $ // modified Joseph Rezeau for regexp compliance 2008/07/22 14:00:00.)

There are not many differences between the "regular distribution" file moodle/question/type/multianswer/questiontype.php and my modified version; only minor changes so that the REGEXP question can be recognized and used within a Cloze question.
I have tested it all on my local installation of moodle 1.9.2 and it does work.
Josep
In reply to Joseph Rézeau

Re: Cloze MULTIANSWER problem

by Steven Ouellette -
Hi Joseph,

You have it exactly. I am talking about the modified questiontype.php linked on that page, which is necessary for embedding REGEXP in Cloze questions. I just tested the file downloaded from that link again. The header reads:

<?php // $Id: questiontype.php,v 1.41.2.5 2008/02/18 20:40:41 pichetp Exp $
// modified Joseph Rezeau for regexp etc. 13:37 21/02/2008

and has some substantial bits missing when compared to the default questiontype.php with the header time stamped 2008/06/19 which is in the current release.

I agree that I am not using the updated one as described by you, however I am using the one that link above downloads. Is it possible that the updated one you referenced is not at that link location?
In reply to Steven Ouellette

Re: Cloze MULTIANSWER problem

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Steven,
If you click on the link at the end of this line in my previous message, you will get the most recent version of the file:

Download modified question/type/multianswer/questiontype.php for moodle 1.9

header: <?php // $Id: questiontype.php,v 1.41.2.10 2008/06/19 01:46:16 pichetp Exp $
// modified Joseph Rezeau for regexp compliance 2008/07/22 14:00:00

I still don't understand why you don't get it from the Moodle Modules and plugins database, I can download it without any problem.
Joseph
In reply to Joseph Rézeau

Re: Cloze MULTIANSWER problem

by Steven Ouellette -
Thanks Joseph - that time it went through just fine. I checked the link on the Modules and Plugins page and that also gave me the new one.

I don't know why I couldn't get it before, but it seems fine now!

I uploaded it and everything seems to be working fine.

Thanks very much, Joseph!
In reply to Joseph Rézeau

Re: Cloze MULTIANSWER problem

by Susana Caixinha -

Hi Joseph,

I'm having the same problem that Steven reported, When I'm trying to create a RegExp question Moodle decodes the question, then when I save a blank page appears and i I make the preview it says The Cloze(multianswer) question "nova" does not contain any question.

The download from modules and plugins questiontype.php as the header questiontype.php,v 1.1.4.7 2008/04/08.

I downloaded the one you mentioned here with the header questiontype.php,v 1.41.2.21 2010/01/14

But I got the same problem.

My moodle is 1.9.5+ and I've downloaded this today.

Can you help me?

Best regards,

Susana

In reply to Susana Caixinha

Re: Cloze MULTIANSWER problem

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Susana,

Have you installed my REGEXP question type first of all? Does it work?

Moodle 1.9.5 is a fairly old version of Moodle, any chance of upgrading to the latest (1.9.12)?

Joseph

In reply to Joseph Rézeau

Re: Cloze MULTIANSWER problem

by Susana Caixinha -

Hi Joseph,

I've installed this one:Question Type: Regular Expression Short Answer

I thinks it's your's, right?

Upgrade is not an option right now sad

thank you

Susana

In reply to Joseph Rézeau

Re: Cloze MULTIANSWER problem

by Pierre Pichet -

Joseph,

Thanks for your fast replysmile.

Pierre

P.S. Collioure is a beautiful place for summer holidays...