Question types: Gapfill

Maintained by Picture of Marcus Green Marcus Green
Cloze question type with VERY simple question creation syntax. Can do drag drop, dropdowns or gapfill questions
1522 sites
20 fans
Moodle 2.5, 2.6, 2.7, 2.8, 2.9, 3.0


Screenshot #0


Picture of Marcus Green
Marcus Green (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Daniel Thies
    Mon, 4 Apr 2016, 10:21 PM
    Hi Kevin,
    You may be able to achieve this with a behaviour plugin
  • Picture of Kevin Bruton
    Wed, 27 Apr 2016, 8:26 PM
    Hi Marcus,
    I've got another question for you. I'm not sure if it's a bug or if I'm doing something wrong. I'm displaying the answers in the "gapfill" mode. When I press the preview button on the editing page, it appears as expected (a text box big enough to enter the word for each "gap"), but when I start a quiz with the question, the answer boxes occupy a whole line. Any ideas on this?
  • Picture of Marcus Green
    Wed, 27 Apr 2016, 8:28 PM
    Hi Kevin, can you email the text of your question and a screen shot of how it appears to marcusavgreen at
  • Picture of Kevin Bruton
    Thu, 28 Apr 2016, 4:01 AM
    Just for the record... in the end it wasn't a problem with this plugin. It was a problem with the Essential theme I was using. Marcus helped debug the problem and to find a solution: I updated the theme and all works as expected now.
    Thanks Marcus!
  • Picture of Chris Klissiaris
    Fri, 24 Jun 2016, 8:59 PM
    Hello, I have a problem with the question type and i would like your help. Sometime when my students type the reply they press space at the end or if they have to fill more than on words on a gap they press space 2 times by mistake so the system finds their reply wrong. Can i fix it somehow? Any ideas?
  • Picture of Marcus Green
    Fri, 24 Jun 2016, 9:12 PM
    Hi Chris, the string in a field is trimmed, so if the correct answer is cat and mat, ' cat ' and ' mat ' (where the quotes indicated extra space) will be accepted as correct. If the answer is 'black cat' and the user enters extra spaces, i.e. black cat it will be marked as wrong. I suggest one gap per expected word.
  • Picture of Chris Klissiaris
    Tue, 28 Jun 2016, 9:18 PM
    Well my problem is that i give as right answer 'black cat'. Sometimes the student though types 'black cat ' and it gets it wrong. or ' black cat ' or 'black_ _ cat'. I am trying a way to fix it and have the system ingore if first char is space or last char is space or if i have more than on spaces then change it to one space. Thats my issue.
  • Picture of Marcus Green
    Tue, 28 Jun 2016, 9:26 PM
    I think I understand your issue Chris, and I suspect that a programmer would be able to address it by normalising the spaces (i.e. making them all to a single space). I'm not in a position to work on that right now however.
  • Picture of Marcus Green
    Tue, 28 Jun 2016, 9:28 PM
    Can create an issue here with a full description so when I do my next round of updates I will see if it is something I can address.
  • Picture of Marcus Green
    Mon, 4 Jul 2016, 6:13 PM
    Hi Chris, I remembered there may be a way of doing what you want. In the sample questions that come with the question type (sample_questions.xml) there is one called Regular Expressions. That has a field where the gap is set to [black\s+and\s+white]. That should require the words black and white but ignore the size of white space added between the words. Let me know if that addresses the issue.
  • Picture of Dananjaya Perera
    Thu, 7 Jul 2016, 3:35 PM
    Hi I saw a small bug kind of a thing, when I creating a custom theme. in common rendering, there is no wrapper for draggables and question texts. So there are some complications in doing some CSS styling works on these things. So I put divs with "draggables" and "questiontxt" classes in it on "formulation_and_controls" function. So I suggest to put these kind of wrapper to this plugins newer versions. That will be lot help to people like me who creating Moodle Themes.
  • Picture of Yezi Yang
    Fri, 8 Jul 2016, 1:40 PM

    I saw that you have posted a message in Moodle forum asking about how gapfill question type can be integrated with quizzes in the Moodle mobile. Could I know when you will release an updated version that can be integrated with the mobile app, please? Gapfill is a very useful question type and we have more than 4500 students using the Moodle mobile app in my institution. I am really looking forward to seeing gapfill can be used in Moodle mobile app.
  • Picture of Marcus Green
    Fri, 8 Jul 2016, 11:27 PM
    Thank you for your feedback Yezi. I don't have any current timetable for creating a version that will work with Moodle mobile, though as you could see from my post, it is something I am interested in. In the meantime I am interested in making sure that it works on mobile devices in standard mobile browsers. What percentage of your users use the Mobile app?
  • Picture of Nicolas Ndalpe
    Tue, 11 Oct 2016, 9:28 PM
    Hi Marcus, Thank you for your plugin. I noticed your plugin is not compatible with "Filter Multi-lang" plugin. Is it in your dev roadmap to add a feature to support multiple languages in question types? If you have any plan, please share. I am new to Moodle but not PHP. I can contribute some code if it can help.

    FYI Filter Multi-lang:

    Looking forward hearing from you soon

    Thank you

    Nicolas Dalpe
  • Picture of Marcus Green
    Tue, 11 Oct 2016, 10:02 PM
    Hi Nicholas Ndalpe, thank you for your interest. I recently tested it with the built in (core) MultiLang filter which seemed to work as I expected, but I have not tested it with multilang2. Email me at marcusavgreen at to discuss further.
1 2 3 4 5 6 7 8 9
Please login to post comments