Question types: Regular expression short answer

qtype_regexp
Maintained by Picture of Joseph RézeauJoseph Rézeau, Picture of Nicolas DunandNicolas Dunand
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.
516 sites
367 downloads
22 fans
Current versions available: 7

Like the Short Answer question, the RegExp Short Answer question expects the respondent to answer an "open" question with a word or a short phrase. However, the RegExp system system gives you access to a more powerful system for analyzing the student's answers with the aim of providing more relevant immediate feedback.

Sets

This plugin is part of set Regular expression questions.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Picture of Joseph Rézeau
Joseph Rézeau (Lead maintainer): Original author
Picture of RISET Université de Lausanne
RISET Université de Lausanne: Supporting institution
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Ken Barker
    Thu, Jun 9, 2016, 9:42 AM
    Thanks for the permutation feature - I have found it very useful. I've also found that it seems to be limited to five options per set - I cannot get six to work. Perhaps this limitation could be documented?
  • Picture of Emmanuel Mayorga
    Fri, Apr 28, 2017, 12:36 PM
    I've read through all of the documentation several times and I am having a hard time understanding why meta characters are not allowed for accepted answers. I must be missing something, can someone please explain? Thank you.
  • Picture of Gilles Boyé
    Thu, Sep 21, 2017, 11:37 PM
    Does the CLOZE integration of Regex still work with Moodle 3.3 ?
  • Picture of Francis Feytout
    Fri, Sep 22, 2017, 5:36 PM
    Hi, I can confirm the regex integration to the multianswer (cloze) type is broken for Moodle 3.3, do you have with up-to-date renderer.php and questiontype.php files ? Or when will have them ? Thanks
  • Picture of Gilles Boyé
    Sat, Oct 14, 2017, 9:11 PM
    To be more precise, the existing renderer.php and questiontype.php files still work fine with the standard cloze question types but they block the new type, MULTIRESPONSE that was introduced in 3.2 (at least).
  • Picture of Gilles Boyé
    Sat, Oct 14, 2017, 9:13 PM
    The description of MULTIRESPONSE can be found at https://tracker.moodle.org/browse/MDL-3782
  • Picture of Sebastian H.
    Mon, Apr 23, 2018, 8:01 PM
    will there be a 3.4 Version of this plugin?

    Best regards
    Sebastian
  • Picture of Nicolas Dunand
    Tue, Apr 24, 2018, 12:29 PM
    Hi Sebastian,

    No 3.4 version planned, but please do report if not fully compatible with Moodle 3.4.
  • Picture of Alan Chadwick
    Tue, Jul 31, 2018, 5:27 PM
    Hi,

    I've been using this plugin for a while now and I'm really grateful to you for creating and maintaining it. It's probably the feature I use most in Moodle.

    I'm trying to add regex to cloze type questions but the links to the hacked files are dead - https://docs.moodle.org/24/en/Regular_Expression_Short-Answer_question_type#Inserting_RegExp_sub-questions_in_Cloze_type_questions

    Is there anywhere that I can find these files, please? It would be extremely helpful to have this functionality with Cloze. No problem if it's a problem.

    Thanks
    Alan
  • Picture of Nicolas Dunand
    Thu, Aug 2, 2018, 2:42 PM
    Hi Alan,

    I'm merely keeping these plugins originally made by Joseph Rézeau up to date. But the feature you are referring to comes from the Moodle 2.4 (obsolete) documentation of the plugin. If you check the current documentation – by clicking the link at the top of the article you mention – you will see that this feature is no longer mentioned.
  • Picture of Joseph Rézeau
    Sat, Oct 6, 2018, 5:50 AM
    As of today, the hacked files for using REGEXP questions to regular Moodle CLOZE questions have been restored (for Moodle 3.5). See the documentation at https://docs.moodle.org/35/en/Regular_Expression_Short-Answer_question_type#Inserting_RegExp_sub-questions_in_Cloze_type_questions
  • Picture of Gavin Botten
    Tue, Nov 13, 2018, 6:32 PM
    Hi guys, I've come across a really interesting anomaly, it isn't REALLY a problem, but the functionality would be a great benefit, if you could get it to work properly in the App as well as in a web browser.

    Anyways, this is the "issue", one of my teachers added underscores(_) where her answers were supposed to be in the "Short Answer" question, the effect this had, is to place the Text Box in the place where the underscores were typed, this in itself, is an AWESOME feature as it means that you could put the box where you want it in a sentence to fill in a missing word or something like that, and it works GREAT in chrome, if you click on the box, it allows you to enter the word, and when you click on the finish attempt/Next button, it saves your answer, which means that it will allow you to submit the answer, however, when you do the same in the latest Moodle App(3.5.2), whether it is the android, iOS or Desktop, it does not save the answer and therefore does not submit an answer when you submit your quiz, just a side note, this problem does not exist in the Moodle Classic App, as the answer box still appears at the bottom of the question regardless of whether you add the underscores or not, in fact the Moodle Classic App does not even show the underscores at all.

    Like I said, this is an awesome feature, whether it was intended or not, and I would really like to see it added into the question type if possible, otherwise, would it be possible to remove the underscore "issue" completely, so that the underscore is visible, instead of the Text Box.

    We are currently running Moodle Web v3.5.2 and the same for Moodle Mobile App.
  • Picture of spoony liu
    Thu, Jun 13, 2019, 12:31 AM
    I updated moodle to 3.7, students can't see the small popup window upon mouse hovering for Cloze using RA or RX. I'm sure that questiontype.php and renderer.php need to be updated.

  • Picture of Yulia Ponomarenko
    Thu, Jul 4, 2019, 1:52 AM
    Thank you for the plugin! I want to ask, why are meta characters allowed in incorrect, but not in accepted answers? Why aren't they allowed in the first answer? Is there some technical reason for that?
  • Picture of Joseph Rézeau
    Sat, Sep 7, 2019, 11:14 PM
    @Yulia,
    The reason is that introducing meta characters in the correct answers might introduce an infinity of correct formulations. My question type only deals with a finite number of CORRECT answers ... and potentially an infinite number of INCORRECT answers.
1 2
Please login to post comments