regexp in moodle 2.0

regexp in moodle 2.0

le stephen S -
Number of replies: 7

Hi,

Using moodle 2.0 and installed the regexp plugin for short answer question type.

I was posting in "general" but not getting responses, then I found the answer to a problem with apostrophe's in answers with regular expressions here in this lesson module category. So I figured I would post my other issue here in the hope people reading this category are interested!

My second issue concerns case sensitive answers.

The documentation says if using moodle 2.0 don't use the /i at the end of the expression (like in moodle 1.9) because moodle 2.0 gives a case sensitivity option on the edit question form. I cannot find any such option, checkbox or anything allowing me to specify case (in)sensitivity when creating or editing the questions. Consequently I have to use [Rr]ed constructs for example everytime I want to allow uppercase ot lowercase.

Is this correct? Or am I missing something?

btw. I would also like to write a tutorial for people to explain installation and use of regexp because I found the standard documentation inadequate and it has taken me days and days to get it to work; if I did, is there a place for "user" contributions? where would I submit such a tutorial?

ta.

Average of ratings: -
In reply to stephen S

Re: regexp in moodle 2.0

le Joseph Rézeau -
Dealbh dhe Core developers Dealbh dhe Particularly helpful Moodlers Dealbh dhe Plugin developers Dealbh dhe Testers Dealbh dhe Translators

Hi stephen,

Wrong forum (again !).

1.- The regexp question plugin is meant to be used to create questions in the quiz questions databank, not for the Lesson module.  You should have posted your question to the Quiz module forum. However, for faster support you may email me directly (to my email address in my moodle profile).

2.- A complete documentation is available for the REGEXP question type. I'm surprised that you would find the "standard documentation" inadequate.sad

3.- Be aware that there is also a "regular expression" option for the shortanswer question type in the Lesson module, but that is in the Moodle core itself, not a 3rd-party plugin like the REGEXP question type. Maybe that is the reason for your confusion.

Joseph (author of the REGEXP question type)

In reply to Joseph Rézeau

Re: regexp in moodle 2.0

le stephen S -

Thanks for the reply!

However, right forum, maybe wrong plugin! wink

I am using regular expressions in the short answer questions, not the quiz. I will mail you directly. I found just replacing questiontype.php in the multianswer folder didn't work. I Assumed I also needed the regexp plugin. Installed it and it did work (except apostrophe's - maybe that was my issue all along!). I might uninstall regexp and see if it short answers still works with just the apostrophe fix applied.

I read (and used) the documentation you link to in your reply. It is this I found "inadequate" and the examples didn't work - again might have been solely due to the apostrophe bug. The French flag examples just were not doing it for me. i will revisit with the regexp plugin removed. As I say, I applied regexp and apostrophe fix and things began to work as expected. I need to do further tests but things are looking up! (except for case sensitivity now!) ...

talk to you l8r

stephen

In reply to stephen S

Re: regexp in moodle 2.0

le Joseph Rézeau -
Dealbh dhe Core developers Dealbh dhe Particularly helpful Moodlers Dealbh dhe Plugin developers Dealbh dhe Testers Dealbh dhe Translators

Hi Stephen,

I'm afraid we still have a communication problem.sad

You posted this to the Lesson module, but in your posts you mention the REGEXP plugin, which, as I tried to explain in my previous post, is meant to be used for the Quiz module's question bank, and has nothing to do whatsoever with the Lesson module.

Please answer this question. Do you want to use:

a) in the Lesson module, the regular expression option of the shortanswer question or...

b) in the Quiz module, the REGEXP plugin to create your own REGEXP questions to be used in a Quiz?

Joseph

In reply to Joseph Rézeau

Re: regexp in moodle 2.0

le stephen S -

I made it clear in my reply. Obviously not clear enough. (sigh).

Post is in the correct forum. My use of the term "Regexp" in the post is incorrect.

You are focused on the trivial and ignoring the issue. I will figure it out myself.

End of.

In reply to stephen S

Re: regexp in moodle 2.0

le Joseph Rézeau -
Dealbh dhe Core developers Dealbh dhe Particularly helpful Moodlers Dealbh dhe Plugin developers Dealbh dhe Testers Dealbh dhe Translators

Hi Stephen,

Our "communication problem" has led me to browse the Moodle Documentation Wiki again. I now see clearly that the documentation was not clear enough and I have revised it accordingly.

The Regular Expression Short-Answer question type page now states:

IMPORTANT NOTE.-

  • The RegExp Short Answer question described in this documentation page is a 3rd-party plugin, which allows you to create questions for the Quiz activity. It is different from the "Use regular expressions" option in the Lesson module.
  • The documentation for the "Use regular expressions" option in the Lesson module is to be found at: Short answer analysis.

If you are indeed using the "Use regular expressions" option in the Lesson module, you need the documentation at: Short answer analysis.

I'm sorry for the inconvenience this lack of clarity inducedblush and thankful to you that I've been able to make things better in the Moodle Docs Wiki.smile I should probably revise the page at Short answer analysis as it is getting quite old.

Now we are starting on a better foundation, please read the relevant documentation and do not hesitate to ask further questions if need be.

ATB

Joseph

 

In reply to stephen S

Re: regexp in moodle 2.0

le mart van der niet -

Hi Stephen,


Did you ever get regexp in shortanswer in Lesson to work? Struggling with it and can't find he right solution!

 

Thanks in advance