Question types ::: qtype_regexp
Maintained by Joseph Rézeau, Nicolas 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.
Latest release:
849 sites
33 fans

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.

Contributors

Joseph Rézeau (Lead maintainer): Original author
RISET Université de Lausanne: Supporting institution

• 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.

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
• 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.
• 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
• 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.

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.
• 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.

• 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?
• 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.
• Tue, Oct 15, 2019, 2:50 PM
Hello, I am trying to have atto editor for the regular expression.. for answers especially, I have changed the $answeroptions[] =$mform->createElement('text', to $answeroptions[] =$mform->createElement('editor'
But, I am facing some issues when editing the same question again, it returns blank editor. but, when it is text it works properly...
• Fri, Jun 5, 2020, 7:59 PM
Dear @Joseph Rézeau

Is this a free plugin ?

Thanks
• Sun, Jul 5, 2020, 5:41 AM
@Mario,
Yes, it's free, of course!
• Mon, Aug 10, 2020, 12:59 PM
Dear Community,
Has anyone experienced issues with upgrading to Moodle 3.9 and the plugin?
I am using "RX" type questions in Cloze tests however since upgrading, I have two issues:
1) When creating new questions, it does not detect that there are any embedded questions when using type RX
2) For existing questions, I get the error "Coding error detected, it must be fixed by a programmer: PHP catchable fatal error" when I display the quiz
• Tue, Aug 18, 2020, 12:56 AM
Just sent private e-mail to Jeffrey
• Wed, Nov 25, 2020, 9:16 PM
@Joseph I was just contacted with a similar issue, that will hopefully be posted here too. How was this catchable error issue fixed ?
• Fri, Nov 27, 2020, 2:11 AM
• Fri, Nov 27, 2020, 3:27 AM
Merci Joseph, will do!