Maintenance of a new question type plugin

Maintenance of a new question type plugin

by Linus Andera -
Number of replies: 17

As part of my master of science I am working on a question type plugin, that allows to grade answers based on regular expressions. One goal was the ability to match shell-code. That is why the plugin provides additional options to make matching shell-code easier. Some basic options, for example an option to ignore case, do also exist. The plugin can generally be used for any kind of regular expression.

The plugin code is open source and available on github: github.com/lni-dev/moodle-qtype_regexmatch

I am now looking for a maintainer to take over the project for future moodle versions.

Average of ratings:Useful (2)
In reply to Linus Andera

Re: Maintenance of a new question type plugin

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I have just briefly looked at your repo, it looks good, tests, documentation etc. Typically plugins tend to languish unless someone is very interested in what they do. What are your plans after your Msc?
In reply to Marcus Green

Re: Maintenance of a new question type plugin

by Linus Andera -
Thank you, but I must disappoint there are currently no tests, the "tests" folder is a remain from your question type template (https://github.com/marcusgreen/moodle-qtype_TEMPLATE/tree/master/tests) which I used as a base of the plugin. 
 
My plans after my master are still vague. If you are interested I can tell you more on Matrix.
In reply to Linus Andera

Re: Maintenance of a new question type plugin

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Well I am glad I asked because now I know that someone else has used my template. Thank you for responding.

In reply to Linus Andera

Re: Maintenance of a new question type plugin

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Linus,

As the author of the Moodle regexp question type I was interested in testing your regexmatch question type.

Tried to install from your github on my local Moodle site running: Windows 11 with XAMPP, Moodle 4.5, PHP 8.2.13.

But upon install I got this error: ddl_exception XML database file errors found.

Joseph

In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Linus,

Your "\question\type\regexmatch\db\install.xml" file is missing all the needed information about tables! 😉

<TABLES>
    <TABLE NAME="question_YOURQTYPENAME" COMMENT="description of table, e.g. options associated overall question">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" NEXT="question"/>

etc.

In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by Linus Andera -
Hi Joseph,

Thank you for testing my plugin. My "install.xml" File is empty, because my plugin does not use any custom tables any more. I am assuming Moodle cannot read the empty "install.xml". Can you try to delete the File?

As a side note: I will write an example-usage file this weekend, which will probably make it much easier to understand the different options my plugin offers.
In reply to Linus Andera

Re: Maintenance of a new question type plugin

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Linus,

By removing the install.xml file I have indeed managed to install your question type on my local host Moodle site.

Bug: if one clicks on one of the Help buttons, the help is displayed, but then it is impossible to un-display that help!

I still have no idea how you mean this question type to be used. Please provide real examples of questions, with their associated correct and incorrect answers. Please post a link to your example usage file when you have published it. 😉

In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

"Bug: if one clicks on one of the Help buttons, the help is displayed, but then it is impossible to un-display that help!"

Hmm, I have recently started seeing the same help bug problem on Moodle builds newer than October 7 (the Moodle sandbox at here is okay). But, on my own stuff, using various Moodles and OS's I am seeing the help bug.

In reply to AL Rachels

Re: Maintenance of a new question type plugin

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers

Some of the bootstrap 5 changes are starting to land so it may be related, but that's just a guess.

In reply to AL Rachels

Re: Maintenance of a new question type plugin

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Using Moodle 4.5+ (Build: 20241025) and default Boost theme, just noticed this very annoying Help display bug! So not related to Linus's question type at all. Same bug using the Classic or Trema themes.

Hope a fix will be found soon. Is there a bug report for it already?

In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Is anyone else bothered by this display bug? Has a bug report been created?
Average of ratings:Useful (1)
In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It bothers me and I do not think a bug report has been created.
In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by Linus Andera -
Hi Joseph,

I have published the examples on GitHub here. Feel free to mention if you still have question or want more examples.
In reply to Linus Andera

Re: Maintenance of a new question type plugin

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Linus,

Thanks for the link and for the examples provided, which make it quite clear how your qtype works. It does work but IMHO is very limited. Are you aware of the other 3 types of Moodle qtype which use regular expressions?

https://docs.moodle.org/en/Regular_Expression_Short-Answer_question_type (my own question type)

https://docs.moodle.org/405/en/Pattern-match_question_type

https://docs.moodle.org/405/en/Preg_question_type

Average of ratings:Useful (2)
In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by Linus Andera -
Hi Joseph,

I was only aware of the first two question types. As far as I know these two are made to do natural language matching and not matching code. That is why we wanted to create a question type, that can use regular expressions.

I also wanted to mention, that I will have to do some more syntax changes to my plugin. I will adjust my examples file accordingly once I am done.
In reply to Joseph Rézeau

Re: Maintenance of a new question type plugin

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
" It does work but IMHO is very limited."
I am always delighted to see more examples of this sort of thing. My own Gapfill question type can use regex but in a limited way. We are blessed to have several examples, although of course I acknowledge Joeseph as the king of question type regex.
Average of ratings:Useful (2)