Blank Spaces

Blank Spaces

Philippe Decloitre -
Erantzun kopurua: 7

Hello everyone,

Is there any way to tell Moodle _for a question such as "What does WWW stand for?" in a test activity_ that there is no difference between these two answers:

"world[space]wide[space]web"

and

"world[space]wide[space][space]web"

In other words is there a way to tell Moodle to ignore extra spaces (inserted by the respondent by mistake)?

Thanks for your time.

Puntuazioen batez bestekoa: -
Philippe Decloitre(e)ri erantzunda

Re: Blank Spaces

Howard Miller -
Core developers-ren irudia Documentation writers-ren irudia Particularly helpful Moodlers-ren irudia Peer reviewers-ren irudia Plugin developers-ren irudia
This should probably be in the quiz forum.

I think this is what the 'regexp' question plugin is for.

http://moodle.org/mod/data/view.php?d=13&rid=338
Howard Miller(e)ri erantzunda

Re: Blank Spaces (Regex documentation)

Frank Ralf -
I haven't looked at the plugin yet, but shouldn't we provide some standard regexes like this one ("Ignore whitespace")?

After all, writing a regular expression is not for the faint of heart and nothing a teacher is used to do.

The only documentation I found are two links in http://moodle.org/help.php?module=lesson&file=questiontypes.html which point to
http://www.zend.com/zend/tut/tutorial-delin2.php
(which probably should better read http://devzone.zend.com/tag/REGEX now) and http://pagesperso-orange.fr/joseph.rezeau/eao/developpement/expandRegexpToString.htm.

I think we should provide better documentation for this important feature in Moodle Docs (mental note to myself...)

Cheers,
Frank
Frank Ralf(e)ri erantzunda

Re: Blank Spaces (Regex documentation)

Howard Miller -
Core developers-ren irudia Documentation writers-ren irudia Particularly helpful Moodlers-ren irudia Peer reviewers-ren irudia Plugin developers-ren irudia
One of my favorite quotes...

"If you have a problem and you solve it with a regular expression, you now have two problems!"
Howard Miller(e)ri erantzunda

Re: Blank Spaces (Regex documentation)

Frank Ralf -
Just for the curious, here's the exhaustive history of that famous quote by all time regex guru Jeffrey Friedl: http://regex.info/blog/2006-09-15/247

(Actually his standard work on regexes, "Mastering Regular Expressions" (http://regex.info) was one of the first programming books I read...)
Frank Ralf(e)ri erantzunda

Re: Blank Spaces (Regex documentation)

Philippe Decloitre -

Thanks to both of you for your answers.

Am I right in understanding that there is a "regular expressions" ferature only in the lesson activity, or is is available in the TEST activity as well (and if so where?)?

Thank you so much!

Philippe

Philippe Decloitre(e)ri erantzunda

Re: Blank Spaces (Regex documentation)

Jeff Forssell -
Often JR (the creator of the reg ex plugin for Moodle) is writing something at the same time I am, but in case he is delayed:

The reg ex feature is a plug-in question type that when it has been installed is available in quizzes, both as an alternative to Short answer question type and as a possible variant under the CLOZE question type. I think it is available in Lesson also, but I haven't any experience there.

Reg exp is planned to be in the core in moodle 2.0.