Your Moodle version

Question types: Regular expression short answer

Maintained by Picture of Joseph Rézeau Joseph Rézeau
This question type (for the Moodle quiz module) aims at a more advanced system of student's response analysis, through the use of regular expresssions. This question type is an extension of the SHORTANSWER type. It can be used on its own and can also be incorporated into the existing Cloze (embedded) question type.



Picture of Joseph Rézeau
Joseph Rézeau (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Bei Chapman
    Sat, Feb 4, 2012, 3:30 AM
    Hi Joseph,

    I am trying to install this plugin to our Moodle dev environment, then I found out that our Moodle build is 2011070102.01, which doesn't meet the minimum version requirement you post for this plugin.

    Is there anyway you can make this plugin compatible with 2.1.2 earlier build, like ours, or we have to upgrade our Moodle to be able to install and use it?

    Thanks for your time.
  • Picture of Patrick Juhl
    Thu, Nov 8, 2012, 6:23 PM
    Hello Joseph,

    I'm trying to use your plugin on a moodle 2.3.2+ installation which meets the plugin's minimum requirements. On the other hand the plugin requires a new version of the two required question behavior plugins. The problem is that the ones available in the plugin directory are too old.

    Can you please make the new plugins available ?

    Thanks in advance,

  • Picture of Joseph Rézeau
    Fri, Nov 9, 2012, 1:20 AM
    New versions of required behaviour plugins are now available for 2.3.
  • Picture of Roland Hauck
    Fri, Nov 30, 2012, 2:21 AM
    Hello Joseph,
    great work, thank you very much!

    Perfect in Quiz/Tests.

    Imho you should add the 'missing links' for plugins related to question behaviour.
    I didn't perform any tests if this plugin works without all redundancies to '... behaviour...' inside the version.php.
  • Picture of Andrea Gregory (Gordon)
    Thu, Aug 29, 2013, 6:57 PM
    Hi Joseph

    We are using the latest 2.5 version of this with the two question behaviours but there is an issue with saving the answers if the user goes back to revisit any questions. All of the sudden the answers have disappeared.. I found this post from a few years ago where someone was having the same issue. -
    We're using the latest versions... any ideas?

    Many Thanks

  • Picture of Bob Puffer
    Fri, Oct 4, 2013, 2:52 AM
    This is what one of my computer science professors is saying about the newest version of regexp:

    1. Its not matching as correct, things it should.
    2. Wherever I had [ ] to match a whitespace it replaces that with ()
    3. If I try to do [ ]+ to match one or more whitespace or some other potential character class [abc]+ I get the message that I cannot have an unescaped metacharcter + * ? $ in a question with a value of more than 0! This is crazy and kind of defeats the purpose of having regular expressions!

    It worked in the previous version, 2.3.
  • Picture of Joseph Rézeau
    Thu, Oct 17, 2013, 6:00 PM
    Further to private exchange with Bob, the problem is dismissed.
  • Picture of Sebastian H.
    Tue, Jun 17, 2014, 11:23 PM
    Hello Joseph,

    will there be a Moodle 2.7 version?

    Best regards
  • Picture of Joseph Rézeau
    Wed, Jun 18, 2014, 1:04 AM
    Yes there will be a 2.7 version... when I have time.
  • Picture of Nicolas Dunand
    Fri, Jul 18, 2014, 3:11 PM
    What I can tell from my – albeit very basic – testing in Moodle 2.7, this question type seems to work flawlessly.
  • Picture of Tomáš Hudec
    Thu, Jan 21, 2016, 6:38 AM
    Would it be possible to extend the plug-in to multiple (short) answers (input fields) each compared to multiple regular expressions?
    The critical section access control algorithm must meet these three conditions:
    1. [ input-field ], 2. [ input-field ], 3. [ input-field ].

    Answers (regular expressions):
    1. for 50%: (mutual )?exclusion
    2, for 25%: progress( in allocation)?
    3. for 25%: bounded waiting
    (Or each worth 1/3 of points.)

    The answer from each input field would be checked to each RE and if a match is found that RE would be removed from checking remaining input fields.

    The purpose is to allow multiple answers in any order.

    Creating only one input field and requiring all the possibilities (separated by comma) would require complex RE mixing all possible orders and dealing with wrong parts. Multiple input field is much simpler.

    Thanks for implementing or pointing me to the solution if it already exists.
Please login to post comments