Multiple-Choice with regular expression option

Multiple-Choice with regular expression option

by Süreç Özcan -
Number of replies: 6
Has anyone expanded the Multiple-Choice question type with an additional answer "other" coupled to a regular-expression-short-answer_text-field yet?

I have seen the multidistract-module, but that one only displays an additional "None of the above"-selection without the possibility to type the correct-answer in a text-field and evaluating the answer with regular expressions.

Thanks in advance,
Süreç
Average of ratings: -
In reply to Süreç Özcan

Re: Multiple-Choice with regular expression option?

by Süreç Özcan -
Nobody has answered to this entry so I guess nobody has implemented this yet.

@ Joseph Rézeau: Do you think this should be implemented easily or is there more to think about? What would I have to consider of?

What do you think would be easier to implement:
1. If in a Choice X you type in ["other" "reg expr"] with "other" as a tag like "/i" in order recognize this being a special case (and to display an other-option with a text-field) and with "reg expr"
with a proper regular expression which is the expected responses (if correct receiving points).
2. Adding a separate other-Choice at the and of all Choices with a text-field to type in the reg-exp. Only if filled with a reg-exp there will be displayed an other option with a text-field for the student.
3. Or any better other idea?
In reply to Süreç Özcan

Re: Multiple-Choice with regular expression option?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
I really don't know how this "regexp other choice" might be implemented, and I wonder if it's a useful idea anyway. Can you suggest some "real-world" examples of use (excluding maths, physics and chemistry, pleaseblack eye).
Joseph
In reply to Joseph Rézeau

Re: Multiple-Choice with regular expression option?

by Süreç Özcan -
Hi Joseph,
thanks for your reply!
I have been using the multiple-choice question with other-option in computer science issues. When doing so I need a second question regexp-short-answer in order to check if the other-option-response is correct (e.g. see picture below).

I have been working on a new concept for source-code-reading-questions in computer science courses in Moodle. The idea is to separate the source code from a following group of questions relaying on the source code. Questions to another source code should be displayed on a second page with the corresponding source code.
So while doing modifications for this concept-issue I had realized that it would be useful to allow the possibility of other-option in order to save time while creating new questions (without the need of a second question).

But when you ask me to give you examples - you explicitly want me to exclude special branches. Is there another alternative I haven't seen yet? Please let me know! Or do you exclude those, because those would be the cases in which it would be interesting to use this other-option?

Süreç
Attachment multichoice_with_other.JPG
In reply to Süreç Özcan

Re: Multiple-Choice with regular expression option?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Süreç> But when you ask me to give you examples - you explicitly want me to exclude special branches. Is there another alternative I haven't seen yet? Please let me know! Or do you exclude those, because those would be the cases in which it would be interesting to use this other-option?

The reason why I am asking for a real-world example outside of those branches is that I find it hard to figure a convincing use-case that I can understand.

Anyway, from your screen shot, it looks like what you are after is a "conditional branching". You would like question #2 to be displayed only to those students who selected the e.other choice in question #1. Am I correct? If so, then I expect it would be difficult to hack the Quiz module to take conditional responses into consideration...

Joseph


In reply to Joseph Rézeau

Re: Multiple-Choice with regular expression option?

by Süreç Özcan -
Hi Joseph,

thanks for your response!

No. What I would like to have:
I would like not to have the need to use question #2 at all. I would rather have question #1 exactly how it is displayed plus in the other-selection a field (like in question #2 with regular expression evaluation) on the right of the "other"-text where the student could type in the expected result in case he/she thinks none of the upper values are correct.
Do you understand what I want?
In reply to Süreç Özcan

Re: Multiple-Choice with regular expression option?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Yes, now I understand what you want. But I still do not know how this is achieveable. Sorry.