I'm using regex evaluation for quizzes in a language course I'm teaching right now. But the students are having trouble because after they complete the quiz, the correct answer field just shows them the regex code. So the feedback is basically useless to them. Is there any way to add a textarea field containing a human-readable list of correct answers that will display alongside the regex answer field?

If there's no way to do this presently, could someone point me to the parts of the module code that handles input, storage, and display of short-answer questions? I can try to find time to write a patch.

Comments

wrightnow’s picture

Agreed - this is an annoying side-effect of the regex system that will stop us using it in production. There should be an option (at least) for a key|value display here so that we can display CATS as the correct answer while allowing the regex to match ?CATS?.

Obviously, the more complex (and useful) the regex gets, the less value it has as a user display item.

marcmolenaar’s picture

We are currently creating quizzes using the latest update of the Quiz module for Drupal 6. We use regular expressions to evaluate Short Answer questions. When the result comes back to the user it is indeed showing the regex as the correct answer and this cannot be changed in any of the quiz settings. Because these quizzes are intended for a beginners language course, these regex feedbacks are very disturbing.
I sincerely hope that this problem will be fixed before April 2011, when we plan to go live with our website.

lejon’s picture

I would also like this feature.

Are there also examples of simple regular expressions? The link provided for regex information is greek to me.

Have any users of Quiz any examples? Do you simply type

?keyword?

In the answer box? How about if you are looking to match multiple words with AND or OR?

Diego Ruiz del Árbol’s picture

Component: Code - Quiz module » Code - Import/Export

Hi!

I am having the same problem.
It will be nice to have a "feedback if correct" text area, in order to avoid the Quiz user to see the regex.
Thanks in advance and congrat for such a great module.

Diego

mjcarter’s picture

I'd also like to see this functionality. I can see a limited way to do it on the clientside with JS replace (would only work with simple patterns) but it would be best tackled on the server side.

djdevin’s picture

Version: 6.x-4.0-rc10 » 7.x-5.x-dev
Component: Code - Import/Export » Code - Short/long answer
Category: Support request » Feature request
Priority: Major » Normal
Issue summary: View changes