Pattern match

Question types ::: qtype_pmatch
Maintained by TimTim Hunt, Phil Butcher
Part of set Open University.
Allows a short response of one or a few sentences that is graded by comparing against various model answers, which are described using the OU's pattern match syntax.
Latest release:
1640 sites
48 fans
Current versions available: 12

There are working examples in eAssessment with Moodle on our OpenLearn site.

The documentation is in How to create questions in Moodle on that site.


Screenshot #0


Tim Hunt (Lead maintainer)
Phil Butcher: Question type designer
Jamie Pratt: Developer
Colin Chambers: Developer
John Beedell: Developer
Chris Nelson: Product owner
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tim
    Tue, Jul 5, 2022, 8:33 PM
    This plugin seems to work with Moodle 3.11, at least we are using that combination. We just have not yet had time to properly test the compatibility of this version with standard Moodle 3.11, so we have not marked it as comaptible. Can you try it, and let us know what you find. It proably works.
  • Kathleen Aermes
    Wed, Jul 6, 2022, 4:35 PM
    thx we will try it and let you know.
  • Tim
    Tue, Aug 9, 2022, 3:43 PM
    I have now nearly finished making a version of Pattern-match which works with Moodle 3.11 and 4.0. The code is on github (in the 'main' branch). We will be testing in over the next few days, and then we will release the new version here.

    If anyone is able to grab the latest code from GitHub, and help us test it, that would be very helpful. Thanks.
  • Glen Gross
    Thu, Oct 6, 2022, 9:40 PM
    We inadvertently installed Pattern Match and it is not compatible with Moodle 4. How do I remove the code?
  • Chris Nelson
    Thu, Oct 6, 2022, 9:47 PM
    You can only uninstall a plugin if there's no question instances on your server. Once there are 0, you will then be able to navigate to: Site administration > Plugins > Question types > Manage question types > [Find PatternMatch row] > Uninstall.
  • Tim
    Thu, Oct 6, 2022, 9:47 PM
    Lantest version of pattern match is compatible with Moodle 4.0. Uninstalling a question type plugin is pretty much like uninstalling any other plugins.
  • Glen Gross
    Thu, Oct 6, 2022, 10:57 PM
    Chris when I navigate to Manage question types the page is blank and I can't edit it. This started after the update.
  • Chris Nelson
    Thu, Oct 6, 2022, 11:01 PM
    Hmm. How do you know it is PatternMatch causing the issue. Is it perhaps PatternMatch JME ( We're still working on that for M4 compatibility.
  • Glen Gross
    Thu, Oct 6, 2022, 11:09 PM
    That is correct. My apologies. The errors being thrown are for PatternMatch JME. How do I uninstall it as I'm getting a blank screen on Manage Question Types. Thank you for your time.
  • Chris Nelson
    Thu, Oct 6, 2022, 11:26 PM
    Have you googled (or your preferred search engine) for using the command line interface (CLI) to remove plugins? Some discussion here:
  • Tim
    Fri, Oct 7, 2022, 6:38 AM
    Compatible version of just released.
  • Glen Gross
    Fri, Oct 7, 2022, 9:57 PM
    Thank you Chris for your help. I have successfully uninstalled the plugin. I was told by our database guru that it was PatternMatch that was throwing the errors. I was able to uninstall the plugin through the web interface. The additional challenge was that after our last upgrade our install was still registered as 3.6. When I was notified of the available update the 3.6 version was installed on our 4.01. It would be useful if Moodle could automatically detect the version number and not allow you to install incompatible plugins. It was my mistake when I failed to double check which version our install was registered as.
  • Stephen Parry
    Tue, Feb 21, 2023, 6:57 PM
    Hi Tim and folks,
    I ma having a frustrating time with this question type because of a couple of issues:
    Firstly when trying to use the suggested rule feature, I am getting no useful results, which seems to come down to a lack of a value in the Amati web service URL setting. What is the state of play here please? I presume the Amati webservice is something only accessible within the OU?
    Secondly, when human override marks are to manually mark an answer as correct, Moodle is still showing the answers with a red cross in the feedback, although the left margin says they are correct.
  • Tim
    Tue, Feb 21, 2023, 7:11 PM
    Correct, 'Suggest rule' requires a back-end the follows the API, and there is not one that is pubicly available. Amati, which we use at the OU, was a academic's research project, and we don't have permission to share it, I am afraid.

    The feedback displayed within the question based on the automated marking. I believe that works in the same way for all Moodle question types, and we are just being consistent with that design. I agree that it looks weird in this case.
  • Paul
    Tue, Sep 5, 2023, 3:03 PM
    Are there any plans to make this plugin 4.2 compatible?
1 2 3 4 5 6
Please login to post comments