Gapfill
Versions
Current version
2.31 (2026040300)
2.31
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2026040300
Version release name: 2.31
Maturity: Stable
Supported Moodle versions: 4.5, 5.0, 5.1, 5.2
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.31
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.31 of the Moodle Gapfill question type April 2026
Confirmed compatibility with Moodle 5.2
Minor tweak to behat to run with Moodle 5.2
Version 2.3 of the Moodle Gapfill question type Feb 2026
Ensure the Gap settings button can only ever appear when the user
editor preference is set to either Tiny or Atto.
Version 2.2 of the Moodle Gapfill question type Jan 2026
Thanks to Adam Jenkins for a CSS reversion Fix.
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/131
Linting of CSS
Version 2.15 of the Moodle Gapfill question type Dec 2025
Thanks to Dragos and Alistair from UCL for help with helping with fix
to allow per gap feedback to be added with the default TinyMCE
editor.https://github.com/marcusgreen/moodle-qtype_gapfill/issues/128
Fixed issue where if dropdowns were selected each one had a carriage return
after it. Thanks to Andrew Obermeier for reporting
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/130
Fixed in CSS.
Version 2.144 of the Moodle Gapfill question type Oct 2025
Moodle 5.1 compatibility confirmed by running automated tests.
Belated thanks to Diego Corti for reporting this issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/111
Assorted mass linting using phpcs (no functional changes).
Version 2.143 of the Moodle Gapfill question type May 2025
Moodle 5 compatibility confirmed by running automated tests.
Thanks to Tim Lock https://github.com/tlock of https://www.openlms.net/ for the following.
Fix for issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/119
Restore of mbz files now ensures that questions are not duplicated as documented
https://moodledev.io/docs/5.0/apis/plugintypes/qtype/restore
Version 2.142 of the Moodle Gapfill question type March 2025
Fixed a bug in backup and restore where the feedback fields were not being backed up.
Thanks to Mark Johnson for reporting this.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/117
Version 2.141 of the Moodle Gapfill question type October 2024
PHP 8.3 compatibility fix. It was throwing an undeclared variables error
Thanks to to Alistair Spark for reporting the issue here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/113
Confirmation of compatibility with Moodle 4.5
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for import
2.3 (2026020900)
2.3
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2026020900
Version release name: 2.3
Maturity: Stable
Supported Moodle versions: 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.3
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.3 of the Moodle Gapfill question type Feb 2026
Ensure the Gap settings button can only ever appear when the user
editor preference is set to either Tiny or Atto.
Version 2.2 of the Moodle Gapfill question type Jan 2026
Thanks to Adam Jenkins for a CSS reversion Fix.
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/131
Linting of CSS
Version 2.15 of the Moodle Gapfill question type Dec 2025
Thanks to Dragos and Alistair from UCL for help with helping with fix
to allow per gap feedback to be added with the default TinyMCE
editor.https://github.com/marcusgreen/moodle-qtype_gapfill/issues/128
Fixed issue where if dropdowns were selected each one had a carriage return
after it. Thanks to Andrew Obermeier for reporting
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/130
Fixed in CSS.
Version 2.144 of the Moodle Gapfill question type Oct 2025
Moodle 5.1 compatibility confirmed by running automated tests.
Belated thanks to Diego Corti for reporting this issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/111
Assorted mass linting using phpcs (no functional changes).
Version 2.143 of the Moodle Gapfill question type May 2025
Moodle 5 compatibility confirmed by running automated tests.
Thanks to Tim Lock https://github.com/tlock of https://www.openlms.net/ for the following.
Fix for issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/119
Restore of mbz files now ensures that questions are not duplicated as documented
https://moodledev.io/docs/5.0/apis/plugintypes/qtype/restore
Version 2.142 of the Moodle Gapfill question type March 2025
Fixed a bug in backup and restore where the feedback fields were not being backed up.
Thanks to Mark Johnson for reporting this.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/117
Version 2.141 of the Moodle Gapfill question type October 2024
PHP 8.3 compatibility fix. It was throwing an undeclared variables error
Thanks to to Alistair Spark for reporting the issue here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/113
Confirmation of compatibility with Moodle 4.5
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters wer
2.2 (2026012200)
2.2
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2026012200
Version release name: 2.2
Maturity: Stable
Supported Moodle versions: 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.2
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.2 of the Moodle Gapfill question type Jan 2026
Thanks to Adam Jenkins for a CSS reversion Fix. https://github.com/marcusgreen/moodle-qtype_gapfill/pull/131
Linting of CSS
Version 2.15 of the Moodle Gapfill question type Dec 2025
Thanks to Dragos and Alistair from UCL for help with helping with fix
to allow per gap feedback to be added with the default TinyMCE
editor.https://github.com/marcusgreen/moodle-qtype_gapfill/issues/128
Fixed issue where if dropdowns were selected each one had a carriage return
after it. Thanks to Andrew Obermeier for reporting
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/130
Fixed in CSS.
Version 2.144 of the Moodle Gapfill question type Oct 2025
Moodle 5.1 compatibility confirmed by running automated tests.
Belated thanks to Diego Corti for reporting this issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/111
Assorted mass linting using phpcs (no functional changes).
Version 2.143 of the Moodle Gapfill question type May 2025
Moodle 5 compatibility confirmed by running automated tests.
Thanks to Tim Lock https://github.com/tlock of https://www.openlms.net/ for the following.
Fix for issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/119
Restore of mbz files now ensures that questions are not duplicated as documented
https://moodledev.io/docs/5.0/apis/plugintypes/qtype/restore
Version 2.142 of the Moodle Gapfill question type March 2025
Fixed a bug in backup and restore where the feedback fields were not being backed up.
Thanks to Mark Johnson for reporting this.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/117
Version 2.141 of the Moodle Gapfill question type October 2024
PHP 8.3 compatibility fix. It was throwing an undeclared variables error
Thanks to to Alistair Spark for reporting the issue here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/113
Confirmation of compatibility with Moodle 4.5
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
2.15 (2025122500)
2.15
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2025122500
Version release name: 2.15
Maturity: Stable
Supported Moodle versions: 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.15
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.15 of the Moodle Gapfill question type Dec 2025
Thanks to Dragos and Alistair from UCL for help with helping with fix
to allow per gap feedback to be added with the default TinyMCE
editor.https://github.com/marcusgreen/moodle-qtype_gapfill/issues/128
Fixed issue where if dropdowns were selected each one had a carriage return
after it. Thanks to Andrew Obermeier for reporting
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/130
Fixed in CSS.
Version 2.144 of the Moodle Gapfill question type Oct 2025
Moodle 5.1 compatibility confirmed by running automated tests.
Belated thanks to Diego Corti for reporting this issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/111
Assorted mass linting using phpcs (no functional changes).
Version 2.143 of the Moodle Gapfill question type May 2025
Moodle 5 compatibility confirmed by running automated tests.
Thanks to Tim Lock https://github.com/tlock of https://www.openlms.net/ for the following.
Fix for issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/119
Restore of mbz files now ensures that questions are not duplicated as documented
https://moodledev.io/docs/5.0/apis/plugintypes/qtype/restore
Version 2.142 of the Moodle Gapfill question type March 2025
Fixed a bug in backup and restore where the feedback fields were not being backed up.
Thanks to Mark Johnson for reporting this.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/117
Version 2.141 of the Moodle Gapfill question type October 2024
PHP 8.3 compatibility fix. It was throwing an undeclared variables error
Thanks to to Alistair Spark for reporting the issue here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/113
Confirmation of compatibility with Moodle 4.5
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle G
2.144 (2025101000)
2.144
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2025101000
Version release name: 2.144
Maturity: Stable
Supported Moodle versions: 5.0, 5.1
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.144
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.144 of the Moodle Gapfill question type Oct 2025
Moodle 5.1 compatibility confirmed by running automated tests.
Belated thanks to Diego Corti for reporting this issue https://github.com/marcusgreen/moodleqtype_gapfill/issues/111
Assorted mass linting using phpcs (no functional changes).
Version 2.143 of the Moodle Gapfill question type May 2025
Moodle 5 compatibility confirmed by running automated tests.
Thanks to Tim Lock https://github.com/tlock of https://www.openlms.net/ for the following.
Fix for issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/119
Restore of mbz files now ensures that questions are not duplicated as documented
https://moodledev.io/docs/5.0/apis/plugintypes/qtype/restore
Version 2.142 of the Moodle Gapfill question type March 2025
Fixed a bug in backup and restore where the feedback fields were not being backed up.
Thanks to Mark Johnson for reporting this.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/117
Version 2.141 of the Moodle Gapfill question type October 2024
PHP 8.3 compatibility fix. It was throwing an undeclared variables error
Thanks to to Alistair Spark for reporting the issue here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/113
Confirmation of compatibility with Moodle 4.5
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be usef
2.143 (2025050100)
2.143
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2025050100
Version release name: 2.143
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.143
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.143 of the Moodle Gapfill question type May 2025
Moodle 5 compatibility confirmed by running automated tests.
Thanks to Tim Lock https://github.com/tlock of https://www.openlms.net/ for the following.
Fix for issue https://github.com/marcusgreen/moodle-qtype_gapfill/issues/119
Restore of mbz files now ensures that questions are not duplicated as documented
https://moodledev.io/docs/5.0/apis/plugintypes/qtype/restore
Version 2.142 of the Moodle Gapfill question type March 2025
Fixed a bug in backup and restore where the feedback fields were not being backed up.
Thanks to Mark Johnson for reporting this.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/117
Version 2.141 of the Moodle Gapfill question type October 2024
PHP 8.3 compatibility fix. It was throwing an undeclared variables error
Thanks to to Alistair Spark for reporting the issue here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/113
Confirmation of compatibility with Moodle 4.5
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions
2.141 (2024101200)
2.141
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2024101200
Version release name: 2.141
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.141
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.141 of the Moodle Gapfill question type October 2024
PHP 8.3 compatibility fix. It was throwing an undeclared variables error
Thanks to to Alistair Spark for reporting the issue here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/113
Confirmation of compatibility with Moodle 4.5
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used
2.140 (2024042300)
2.140
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2024042300
Version release name: 2.140
Maturity: Stable
Supported Moodle versions: 4.0, 4.1, 4.2, 4.3, 4.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.140
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a
2.139 (2022061901)
2.139
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2022061901
Version release name: 2.139
Maturity: Stable
Supported Moodle versions: 4.0, 4.1, 4.2, 4.3, 4.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.139
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.139 of the Moodle Gapfill question type April 2024
Fixes for PHP 8.2 deprecation messages. Updates to ci to confirm compatibility
with Moodle 4.4.
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a
2.138 (2023072899)
2.138
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2023072899
Version release name: 2.138
Maturity: Stable
Supported Moodle versions: 4.0, 4.1, 4.2, 4.3
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.138
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.138 of the Moodle Gapfill question type May 2023
Fix for PHP 8.1 deprecation messages. Thanks to Joseph Rézeau for
creating the ticket for that.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/104
Re-instate the creation of letterhints field in the db for upgrades from
before v1.97 (in 2018). Thanks to Dr. Lucia Liljegren for creating the ticket for
that https://github.com/marcusgreen/moodle-qtype_gapfill/issues/105
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like
2.137 (2023042000)
2.137
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2023042000
Version release name: 2.137
Maturity: Stable
Supported Moodle versions: 4.0, 4.1, 4.2
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.137
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.137 of the Moodle Gapfill question type April 2023
Fix compatibility on mobile with dark theme (css tweak)
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/100
Centre droptarget text to better handle long answers
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/99
Additional English language sample questions.
Version 2.136 of the Moodle Gapfill question type Nov 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste from other sources it can include items like <!--[if !supportLists]
creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two signific
2.136 (2022111900)
2.136
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2022111900
Version release name: 2.136
Maturity: Stable
Supported Moodle versions: 4.0, 4.1
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.136
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.136 of the Moodle Gapfill question type Month 2022
Remove html comments from code before rendering. There is no reason to include comments at run time and when people copy and paste
from other sources it can include items like <!--[if !supportLists] creating spurious gaps. Thanks to sunnac for reporting this.
New behat test to confirm core mlang and mlang2 filters work as expected.
Additional English language sample questions.
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83. Thanks to Vitaliy Baran for reporting that. Switched to using ES6/HTML5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per qu
2.135 (2022092800)
2.135
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2022092800
Version release name: 2.135
Maturity: Stable
Supported Moodle versions: 4.0
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.135
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.135 of the Moodle Gapfill question type Sept 2022
The use of jQuery UI broke the display of the 'dock' in Moodle 4.0 see https://github.com/marcusgreen/moodle-qtype_gapfill/issues/83 Switched to using ES6 html5 drag and drop code.
More English language example questions
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release
2.134 (2022061900)
2.134
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2022061900
Version release name: 2.134
Maturity: Stable
Supported Moodle versions: 3.10, 3.11, 3.7, 3.8, 3.9, 4.0
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.134
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.134 of the Moodle Gapfill question type Jun 2022
Fix for duplicated draggables when used in the mobile apps. Thanks to Nicholas Stefanski for reporting this and for contributing a code solution.
Added $CFG->wwwwroot in front of path to mobile css for where moodle home hangs of a folder from the
url.
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
2.133 (2022032500)
2.133
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2022032500
Version release name: 2.133
Maturity: Stable
Supported Moodle versions: 3.10, 3.11, 3.7, 3.8, 3.9, 4.0
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.133
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.133 of the Moodle Gapfill question type Mar 2022
Missing space around or in non English feedback. Where the language was not
English and there is more than one correct answer the space was missing around
the tanslation of or. So in German if the correct answers are red or green it would present as
redodergreen instead of red oder green. My thanks to Simon Küpfer for reporting this issue.
Described here
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/80
Fix renderer.php so the output complies with the validator at https://validator.w3.org/
My thanks to t-schroeder for raising this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/77
Which gave me the idea of validating the output.
Fix for layout in optionsaftertext mode
Bump to version of Moodle required from 3.3 to 3.7, to make support easier
Updates to behat tests to work with Moodle 4.0. No further support for
MS IE browser 11.
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
My thanks to Serge Fleussu for reporting this.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). My thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. My thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
My thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
My thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
My thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. My thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Mythanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Thanks to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces a
2.132 (2021073100)
2.132
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2021073100
Version release name: 2.132
Maturity: Stable
Supported Moodle versions: 3.10, 3.11, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.132
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.132 of the Moodle Gapfill question type Jul 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/76
where spurious div broke display of quiz blocks.
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). Thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. Thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
Thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
Thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop
2.131 (2021063001)
2.131
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2021063001
Version release name: 2.131
Maturity: Stable
Supported Moodle versions: 3.10, 3.11, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.131
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.131 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). Thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. Thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
Thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
Thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard d
2.13 (2021063000)
2.13
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2021063000
Version release name: 2.13
Maturity: Stable
Supported Moodle versions: 3.10, 3.11, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.13
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.13 of the Moodle Gapfill question type June 2021
Fix for Mobile App/ionic5, long text questions were cutting off instead of wrapping.
More english language example questions. Moved from travis ci to github actions and
moodle-ci
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). Thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. Thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
Thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
Thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard du
2.12 (2021051500)
2.12
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2021051500
Version release name: 2.12
Maturity: Stable
Supported Moodle versions: 3.10, 3.11, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.121
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.12 of the Moodle Gapfill question type May 2021
Fix for iOS (e.g. iPads/iPhones). Thanks to Deny Supanji for reporting this. The text entry field now has the spellchecker = false which stops it changing apostrophes into right quote marks.
Refactored get attributes into separate function for clarity in renderer.php (a developer thing)
Adapted to support ionic5 for the mobile app while keeping backwards compatibility for ionic3. See https://docs.moodle.org/dev/Adapt_your_Mobile_plugins_to_Ionic_5
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. Thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
Thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
Thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version
2.11 (2021012900)
2.11
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2021012900
Version release name: 2.11
Maturity: Stable
Supported Moodle versions: 3.10, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.11
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.11 of the Moodle Gapfill question type Jan 2021
Fix for https://github.com/marcusgreen/moodle-qtype_gapfill/issues/64.
CSS change to fix issue with dropping onto targets. Thanks to
Tim Schroeder for reporting this.
Fix for duplicate draggbles appearing when using the or (|), opertor. As described here
https://moodle.org/mod/forum/discuss.php?d=414949&parent=1672515
Thanks to Nancy Chan for reporting that.
Disable regex in dropdown mode. This is a fix for this issue
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/32
Error in English lang string. Thanks to lucaboesch
https://github.com/marcusgreen/moodle-qtype_gapfill/pull/69
More unit tests in response to coverage reports (purely for developers)
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
Thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type Nov 2016
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type Oct 2016
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type Oct 2016
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type Oct 2015
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type Mar 2016
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type Jan 2014
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Tha
2.10 (2020102500)
2.10
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020102500
Version release name: 2.10
Maturity: Stable
Supported Moodle versions: 3.10, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.10
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.10 of the Moodle Gapfill question type Oct 2020
Removed an end_div tag because it broke the display of blocks in quiz.
Thanks to Eliot Hoving of the UCL University in the UK for reporting this.
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Geiger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing a closing div tag . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing wor
2.09 (2020092900)
2.09
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020092900
Version release name: 2.09
Maturity: Stable
Supported Moodle versions: 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.09
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.09 of the Moodle Gapfill question type Sep 2020
Singleuse draggbles was always on because javascript interpreted "0" as true.
The file renderer.php now casts it to Boolean (true or false) so singleuse draggables
is only on when the setting is clicked. My thanks to Mrs Summers for reporting this
and helping to identify where the problem was and also to Matthias Giger for testing.
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing . Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing words."
2.08 (2020091100)
2.08
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020091100
Version release name: 2.08
Maturity: Stable
Supported Moodle versions: 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.08
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.08 of the Moodle Gapfill question type Sep 2020
Removed missing nullable parameter type ?int, as it breaks on PHP 7.0 which is supported at least
up till Moodle 3.5. The optionsaftertext setting did not work on Mobile, fixed by adding
a missing closing div tag. Discarded the code in upgrade.php that changed default datatype of singleuse. It would have applied to a tiny number of users and not actually break anything.
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing words."
2.07 (2020090700)
2.07
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020090700
Version release name: 2.07
Maturity: Stable
Supported Moodle versions: 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.07
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.07 of the Moodle Gapfill question type Sep 2020
Discard changes to mobile that were supposed to make singleuse work, they broke how it worked on mobile. Added class to put space under answeroptions in
mobile.
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing words."
2.06 (2020082902)
2.06
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020082902
Version release name: 2.06
Maturity: Stable
Supported Moodle versions: 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.06
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.06 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing words."
2.03 (2020082901)
2.03
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020082901
Version release name: 2.03
Maturity: Stable
Supported Moodle versions: 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.03
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.03 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing words."
2.00 (2020082900)
2.00
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020082900
Version release name: 2.00
Maturity: Stable
Supported Moodle versions: 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v2.02
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 2.0 of the Moodle Gapfill question type Aug 2020
New setting singleuse. Draggables are removed from the list of options once they are dropped into a gap. Set on and off through a "singleuse" checkbox in the editing form.
Also works in mobile app.
Added a new feature for possible future that when an item is dropped into a gap the gap has the 'dropped' class added. I may use this in the future for styling, i.e. change appearance on drop.
Double click on a gap with text will clear it now.
Added js logic to the Display answers checkboxes. For example, if dropdowns is selected the Singleuse checkbox is unchecked and disabled. Have not applied logic to the checkboxes under 'show more'
Refined the unit test classes to consolidate create_question and create_question2 into a single function. This is just for developer clarity.
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing words."
1.979 (2020061300)
1.979
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020061300
Version release name: 1.979
Maturity: Stable
Supported Moodle versions: 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.979.1
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 1.979 of the Moodle Gapfill question type June 2020
Filters were not being processed. LayTex in particular. Thanks to Elena Safiulina for reporting this issue. Be aware that only plain text can be used for draggables etc, however LayTex can be used in the body of the question text.
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which
I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback
from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode
CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit
but will help in future development.
Version 1.976 of the Moodle Gapfill question type May 2019
Updated icon design to include a hint of color and in svg format.
More code compliance tweeks.
Increased number of english language sample questions to over 450
Version 1.975 of the Moodle Gapfill question type Jan 2019
Added a collection of sample english language questions in
examples\en\english_language.xml that can be imported.
Briefly tested with the Embed question filter
https://moodle.org/plugins/filter_embedquestion
When using Adaptive question behaviour the gapfeedback was always for a correct answer. Thanks to Joseph Rézeau for reporting that. Joseph also helped with improving the strings which will
help with translation.
The value for "show number of correct responses" checkbox on hints didn't do anything. That is now fixed. My thanks to Dr Anna Stefaidou for reporting this.
Changed fixedgapsize default to on for fresh installs (change in install.xml)
Fixed issue in mobile app where it gave the 'tap to select' prompt even when the question was in drop down mode.
Fixed an error message "Can not add jQuery plugins after starting page output!"
That showed when the question type was used in simple lesson
https://moodle.org/plugins/mod_simplelesson
and debug output was turned on. This would have shown in other modules that use the question engine.
Converted dragdrop.js to use amd modules, which is the standard
moodle way of handling javascript.
The utility
admin/cli/check_database_schema.php
threw errors after upgrade indicating incorrect data types and allow null settings. Fixed
the upgrade.php to use code generated by xmldb editor and also fixed
upgrade.php to use proper blocks of update code that checks version.
Restricted the scope of some css classes so they cannot interfere with other components/themes.
As reported here https://github.com/marcusgreen/moodle-qtype_gapfill/issues/39
Version 1.974 of the Moodle Gapfill question type Sep 2018
Spurious debugger statement found in mobile js code
Version 1.973 of the Moodle Gapfill question type Sep 2018
Support for the new Moodle 3.5 mobile app. Huge thanks to Dani Palou from Moodle HQ,
without his help I would not have been able to add this capability. Thanks to Elton LaClare
for help with testing.
Version 1.972 of the Moodle Gapfill question type May 2018
Fixed a bug where correct answers were shown even though it was turned off in the quiz settings checkbox.
Thanks to Matthias Giger and contributors to the Moodle German language for reporting this. Fixed
a bug introduced in the last release whereby the value of optionaftertext was not being saved. Thanks
to Elton LaClare for reporting that. Additional PHPDocs, code standards compliance and confirmation that
it works with Moodle 3.5.
Implemented privacy API for GDPR compliance, see discussion here
https://moodle.org/mod/forum/discuss.php?d=365857
Version 1.971 of the Moodle Gapfill question type Feb 2018
Bug fix for issue where dragdrop did not work on iOS. Improvements in code standards compliance.
Replaced various hard coded strings with get_string calls to allow for translation. Thanks to Dinis Medeiros for reporting this.
The text in the letter hint prompt that appears in the Multiple tries section can be customised via the language pack. See instructions
https://docs.moodle.org/en/Language_customisation#Changing_words_or_phrases
Version 1.97 of the Moodle Gapfill question type Feb 2018
Letter hints, new feature which only works when Interactive with multiple tries behaviour is used. A new checkbox in the question
creation form toggles letterhints mode. This takes effect when an interactive question behaviour is selected. There is a global
checkbox setting for letterhints. If this is on, when a new question is created hints will be inserted into the first and second
boxes under multiple tries block. If it is toggled on with an existing question the hints will have to be added by hand in the
multiple tries section. Then when a student gives an incorrect response they will be given incrementing letters from the correct
answer when they press try again. Thanks to Elton LaClare for the idea for this and to his employer Sojo University Japan
http://www.sojo-u.ac.jp/en for funding.
Bug fix that broke the display of the quiz menu when optionsaftertext was selected but gapfill mode was selected. Thanks to
Lizardo Flores for reporting this.
Version 1.961 of the Moodle Gapfill question type Dec 2017
Mainly a bugfix where MS SQL server installations would not create the gapfill settings table.
My thanks to marisol castro for reporting this. Improvements to phpdoc comments
Version 1.96 of the Moodle Gapfill question type Oct 2017
Per gap feedback. This is a significant new feature and allows the creation of feedback that is
displayed dependent on if the student gave a correct or incorrect response on a per-gap basis The feedback is
entered by clicking a new button Gap settings which is shown under the question text field. This
toggles the screen to a grey colour and makes the text uneditable. Clicking a "gap" pops up a dialog
with fields for correct or incorrect response. Most HTML is stripped when the feedback is saved. Bold,
Italic, Underscore and hyperlinks are retained. The feedback area does not support images. It has been tested
with the contents of a 10K file (though that would not be a sensible use of the feature).
Substantial improvements to amount of phpdoc comments, which is only of benefit to developers
Version 1.95 of the Moodle Gapfill question type June 2017
New setting optionsaftertext can be to show the draggable options after the text. Thanks to Elton LaClare for the inspiration to do this.Fixed a bug where if there were multiple questions on a single page the draggables would become disabled after the first submit. Added behat featurefile add_quiz to test in
quiz rather than just in preview mode. Added dragging of selections (previously it was
only type in). Configured up .travis.yml so testing is run every time there is a
git commit. Made code tweaks to comply with results (e.g. csslint)
Version 1.94 of the Moodle Gapfill question type February 2017
This is a minor release with a css fix and improvements to the mobile app code.
Thanks to Chris Kenniburg for the CSS fix to remove the comma before focus. Added
fix to renderer.php so select element list shows down arrows on android mobile.
In the mobile app answer option selection is more obvious. For dragdrop
questions there is now a prompt that says "Tap to select then tap to drop" as with
the core question types. Thanks to Elton LaClare for the mobile app feedback.
Version 1.93 of the Moodle Gapfill question type February 2017
This release was made possible through the support of Sojo University Japan.
http://www.sojo-u.ac.jp/en/ . Many thanks to Elton LaClare and Rob Hirschel.
Added remote addon support for the Moodle mobile app. CSS to give indication of onfocus in text imput boxes, subtle change in
background color on hover over draggables. Other CSS tweaks to size of input and draggables. Fixed #25 on github
Version 1.92 of the Moodle Gapfill question type contributed by Marcus Green
CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers which improves display in feedback for dropdowns.
Removed setting of height in em in styles.css which was breaking the display on iOS.
Version 1.91 of the Moodle Gapfill question type contributed by Marcus Green
[.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedbak
Version 1.9 of the Moodle Gapfill question type contributed by Marcus Green
In the admin interface there is now a link for importing the sample questions into a course.
This is a convenience way of doing a standard XML file question import.
Fixed issue where extended characters were not handled correctly. Have tested with
accented French and Spanish words, Cyrillic and Hindi. Thanks for the feedback to Eduardo Montesinos,
Mariapaola Cirelli, Ellen Spertus and others
Fixed issue where in interactive mode an incorrect answer would show empty braces (typically [])
where the answer in braces would have been shown in other modes.
Version 1.8 of the Moodle Gapfill question type contributed by Marcus Green
Fixed a bug by adding checking for initialisation of array values. Discussed here
https://moodle.org/mod/forum/discuss.php?d=314487#p1274939. Thanks to Ellen Spertus,
Al Rachels and others for the feedback on this.
Added a value in settings so the default for case sensitive can be set
Updated the export of xml code so it adds information on the version of the Gapfill
plugin and the version of Moodle that ran the export. This data can be useful
for tracking down issues (it means I don't have to get back to people asking for
versions which people may not know and might get wrong).
The | symbol will now be recognised as an or operator even
when regular expression processing is turned off. This is handy for programming language
and math questions that use characters treated as special such as /?* etc.
Version 1.7 of the Moodle Gapfill question type contributed by Marcus Green
This is maintenance version with no new features. The main purpose of this version is
to ensure the question type will work with Moodle 2.9. This is required because the
JQuery code in the previous version of Gapfill would not work with 2.9. The versions
of JQuery, JQuery UI and touchpunch (for mobile support) have been updated. This addresses
some issues with drag and drop when using MS IE. The calls are taken from the way JQuery is
used in the ordering question type. Credit to Gordon Bateson for this.
There is a fix to ensure proper handling of string comparison. Previously
tolower was used which would not work correctly with text containing accents.
This has been changed to use mb_lower. Another issue was that a gap like
[cat|dog] would match bigcat and catty and adog and doggy. This is now fixed.
Version 1.6 of the Moodle Gapfill question type contributed by Marcus Green
When fixed gapsize the width of a gap such as [cat|tiger] will be the width of tiger not cat|tiger, i.e. 5 not 9
When display right answer is selected in the quiz settings the correct answer will be displayed within the question delimiters.
If the correct answer is [cat] and you enter[dog] the answer will show dog [cat] (with dog in red followed by a tick).
Thanks to Gordon McLeod of Glasgow University for inspiring this feature.
When using deferred feedback zero marks were given overall when any gaps were blank. This is now fixed
Version 1.5 of the Moodle Gapfill question type contributed by Marcus Green
This version has two significant new feature is the double knot or !! and the fixedgapsize setting.
The use of !! indicates that a gap can be left empty and considered a correct response.
This is of particular use with the | or operator where one or more answers or a blank will be considered correct e.g. [cat|dog|!!].
As part of this change the calculation of maximum score per question instance has been modified, so "The [cat] sat on the [!!]"
each gap will be worth 1 mark. This is necessary to ensure that if a value is put in the [!!] space a mark will be lost.
The fixedgapsize settings makes all gaps the same size as the biggest. This stops size being a clue to the correct answer.
The upgrade.php file has been tweaked to use XMLDB to fix issues with databases other than MySQL.
Version 1.4 of the Moodle Gapfill question type contributed by Marcus Green
This release has one bug fix and one new feature. The new feature is support for drag and drop
on touch enabled devices such as iphone, ipad and android. This is by adding in the JQuery touchpunch library into
the renderer.php file. Many thanks to Adam Wojtkiewicz who suggested and tested this solution.
There was a bug in the db/install.xml file with some of the next previous values being incorrect and so preventing a fresh
installation on Moodle 2.4.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around
the missing words."
Version 1.3 of the Moodle Gapfill question type contributed by Marcus Green
The main new feature is disableregex which switches from regular expressions for
matching the given answer with the stored answer to do a plain string comparison. This
can be useful for maths, HTML and programming questions. In this mode the characters that have a
special meaning in regular expressions are treated as plain strings.
This feature appears as a checkbox in the More Options section of the question editing form. The default
for this option can be set in the admin interface so you could set this to be checked by default for every
new question.
I have included a file called sample_questions.xml in with the source code that can be imported
to illustrate the features.
It is now possible to have drag and drop with distractors in "answers in any order" mode. This is where
each field contains the same set of strings separated by the | (or) operator. In dragdrop and dropdown mode
these will be broken into separate selectable answer options. This builds on the code in the previous
version that allowed this approach in plain gapfill mode and can discard duplicate correct answers.
This version has been modified to work with Moodle 2.6. Previous versions of this quesiton type
will throw an error when used with Moodle 2.6 which is linked to a rule on the question text editing box.
This version has been tested mainly in Moodle 2.5 and for about a month with early versions of Moodle 2.6.
It has been installed and briefly tested with 2.4 but it will not work at all with versions of Moodle prior
to 2.1
It is now possible to have commas in the answer strings and to have commas in distractors by escaping
them with a backslash.
A bug has been fixed that was stopping distractor options being exported to xml. A bug has been fixed in
the CSS which meant that there was no border to the gaps when viewed in chrome.
Thanks to Adam Wojtkiewicz testing and feedback. I have implemented his suggestion for a minor modification
to the Javascript to ensure it works along with Geogebra. He has made some suggestions to allow the dragdrop
code work on more mobile platforms which I hope to look at closely in the near future.
Thanks for testing and feedback and comments from Joseph Rézeau, Frankie Kam and Nigel Robertson and
Wayne Prescott.
The elevator pitch for this question type is as follows
"The Gapfill question type is so easy use, the instructions require one 7 word sentence. Put square braces around the missing words."
1.978 (2020052400)
1.978
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2020052400
Version release name: 1.978
Maturity: Stable
Supported Moodle versions: 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.978
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 1.978 of the Moodle Gapfill question type May 2020
Fixed issue with case sensitivity when using | operator and ignore duplicates
Thanks to Jason Rogers of the South Carolina Dept of Education and Dipak Kumar of Blackboard for reporting this and helping test the solution.
Fix for when force clean is on, which is planned to be a default, see
https://tracker.moodle.org/browse/MDL-62352
Thanks to Hubong Nguen for the UK OU who contributed a patch for wordselect without which
I would not have known about this.
A fix for an error triggered in the question analysis in the quiz statistics report. Thanks to Chris Kenniburg of Dearborn schools for reporting this.
The editing form was ignoring the settings/default for fixedgapsize. It is now recognising this and
by default on installation the widths gaps will be set to that of the largest gap. See docs at
https://docs.moodle.org/en/Gapfill_question_type#Fixed_Gapsize. I noticed that myself.
Regular expressions are now disabled by default. Thanks to the suggestion from Howard Miller, legendry contributor at the Moodle.org forums.
https://github.com/marcusgreen/moodle-qtype_gapfill/issues/31
1.977 (2019100400)
1.977
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2019100400
Version release name: 1.977
Maturity: Stable
Supported Moodle versions: 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.977
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Version 1.977 of the Moodle Gapfill question type Oct 2019
Fixed an issue under Chrome for Windows where answer options (draggables) would not wrap as previously. Thanks to Joseph Rézeau for passing on the details as reported in the Moolde.org French forum by Jean-Gabriel DEPINOY.
The fixedgapsize setting is now set to on with fresh installs.
CSS fix for when the theme creates a paragraph for each gap. Thanks to feedback from Daniel Garcia (https://top.totalenglish.net) that helped identify this.
Thanks to German Valero thanks for further Spanish translations of example questions.
Thanks to Dave Foord for help identifying a bug displaying wrong answers in dropdown mode CSS was not being applied to correct/incorrect responses when in dropdown mode.
Switched to using amd modules in the javascript for question editing. No end user benefit but will help in future development.
1.976 (2019051900)
1.976
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2019051900
Version release name: 1.976
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.976 for Moodle
New svg icon with a touch of colour similar to the Wordselect question type. More english language example questions in xml format (about 450 now). Further code compliance.
For history of changes see
https://github.com/marcusgreen/moodle-qtype_gapfill/blob/master/changelog.md
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.2,3.3,3.4,3.5,3.6,3.7
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
1.975 (2019021600)
1.975
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2019021600
Version release name: 1.975
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.975
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.975 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4,3.5,3.6
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
1.974 (2018091600)
1.974
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2018091600
Version release name: 1.974
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.974_1
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.974 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4,3.5
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
1.973 (2018091200)
1.973
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2018091200
Version release name: 1.973
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4, 3.5
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.973
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.973 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4,3.5
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
1.972 (2018050700)
1.972
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2018050700
Version release name: 1.972
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4, 3.5
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.972_1
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.972 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4,3.5
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.972 Implement Privacy/GDPR API, minor bug fixes
Version 1.971 Bug fix for ios dragdrop issue
Version 1.97 letter hint from correct response added to gaps in interactive mode when incorrect answers added
Version 1.96 per gap feedback entered via a popup form by clicking on the gap when editing
Version 1.95 add optionsaftertext option so draggables appear after text
Version 1.94 fix for select dropdowns on webkit/android.Tap to select prompt in mobile app
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
1.971 (2018020300)
1.971
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2018020300
Version release name: 1.971
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.971
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.971 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.97 letter hint from correct response added to gaps in interactive mode when incorrect answers added
Version 1.96 per gap feedback entered via a popup form by clicking on the gap when editing
Version 1.95 add optionsaftertext option so draggables appear after text
Version 1.94 fix for select dropdowns on webkit/android.Tap to select prompt in mobile app
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
1.97 (2017122305)
1.97
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2017122305
Version release name: 1.97
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.97
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.97 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.97 letter hint from correct response added to gaps in interactive mode when incorrect answers added
Version 1.96 per gap feedback entered via a popup form by clicking on the gap when editing
Version 1.95 add optionsaftertext option so draggables appear after text
Version 1.94 fix for select dropdowns on webkit/android.Tap to select prompt in mobile app
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
1.961 (2017122301)
1.961
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2017122301
Version release name: 1.961
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.961_2
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.961 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and
wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.96 per gap feedback entered via a popup form by clicking on the gap when editing
Version 1.95 add optionsaftertext option so draggables appear after text
Version 1.94 fix for select dropdowns on webkit/android.Tap to select prompt in mobile app
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
1.96 (2017111700)
1.96
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2017111700
Version release name: 1.96
Maturity: Stable
Supported Moodle versions: 3.1, 3.2, 3.3, 3.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.96
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.96 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app.
Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and wrong answers.
These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.1,3.2,3.3,3.4
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.96 per gap feedback entered via a popup form by clicking on the gap when editing
Version 1.95 add optionsaftertext option so draggables appear after text
Version 1.94 fix for select dropdowns on webkit/android.Tap to select prompt in mobile app
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
1.95 (2017070201)
1.95
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2017070201
Version release name: 1.95
Maturity: Stable
Supported Moodle versions: 3.0, 3.1, 3.2, 3.3, 3.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.952
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.95 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices and the mobile app. Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and wrong answers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 3.0,3.1,3.2,3.3
It will not work with versions of moodle prior to 2.6.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.95 add aftergapfeedback option so draggables appear after text
Version 1.94 fix for select dropdowns on webkit/android.Tap to select prompt in mobile app
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
1.94 (2017022200)
1.94
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2017022200
Version release name: 1.94
Maturity: Stable
Supported Moodle versions: 2.9, 3.0, 3.1, 3.2, 3.3
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.94
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.94 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the
question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.9,3.0,3.1,3.2
It will not work with versions of moodle prior to 2.6.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.94 fix for select dropdowns on webkit/android.Tap to select prompt in mobile app
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
1.93 (2017013100)
1.93
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2017013100
Version release name: 1.93
Maturity: Stable
Supported Moodle versions: 2.9, 3.0, 3.1, 3.2
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.93
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.93 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the question with square braces to define the missing words. For example The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.9,3.0,3.1,3.2
It will not work with versions of moodle prior to 2.6.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.93 support for mobile app. onfocus CSS on inputs, hover on draggable, bugfix in draggables (#25 on github)
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive
1.92 (2016100802)
1.92
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2016100802
Version release name: 1.92
Maturity: Stable
Supported Moodle versions: 2.7, 2.8, 2.9, 3.0, 3.1, 3.2
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.92
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.92 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the
question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.9,3.0,3.1,3.2
It will not work with versions of moodle prior to 2.6.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as aftergap feedback
Version 1.92 CSS to improve dropdowns on chrome mobile, discard gaps in wrong answers:improves display in feedback
1.91 (2016100801)
1.91
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2016100801
Version release name: 1.91
Maturity: Stable
Supported Moodle versions: 2.6, 2.7, 2.8, 2.9, 3.0, 3.1
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag: v1.91
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.91 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the
question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.6, 2.7,2.8,2.9,3.0
It will not work with versions of moodle prior to 2.6.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
Version 1.91 [.+] will make any text a valid answer and if left empty will not show the .+ as after gap feedback
1.9 (2006082518)
1.9
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082518
Version release name: 1.9
Maturity: Stable
Supported Moodle versions: 2.6, 2.7, 2.8, 2.9, 3.0, 3.1
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.9 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the
question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.6, 2.7,2.8,2.9,3.0, 3.1
After the release of a version of Moodle I install and test the first alpha of the next version and test/develop under the alpha/beta release cycle.
It will not work with versions of moodle prior to 2.6.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | now works with regex off
Version 1.9 added link in the admin interface to make it easy to import_example questions to a course
1.8 (2006082516)
1.8
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082516
Version release name: 1.8
Maturity: Stable
Supported Moodle versions: 2.5, 2.6, 2.7, 2.8, 2.9, 3.0
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.8 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the
question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5, 2.6, 2.7,2.8,2.9,3.0
It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Go to Site Administration/Notifications
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
Version 1.8 added casesensitive option in settings, plugin version information in xml export, | works with regex off
1.7 (2006082515)
1.7
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082515
Version release name: 1.7
Maturity: Stable
Supported Moodle versions: 2.5, 2.6, 2.7, 2.8, 2.9
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.7 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the
question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5, 2.6, 2.7,2.8 and 2.9
It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
Version 1.7 updated jQuery, jQuery ui and touchpunch and the way they are called to work with Moodle 2.9
1.6 (2006082514)
1.6
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082514
Version release name: 1.6
Maturity: Stable
Supported Moodle versions: 2.4, 2.5, 2.6, 2.7, 2.8
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.6 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5, 2.6, 2.7. and 2.8
It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
Version 1.6 added display of the correct answer next to gaps with wrong answers entered
1.5 (2006082513)
1.5
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082513
Version release name: 1.5
Maturity: Stable
Supported Moodle versions: 2.5, 2.6, 2.7, 2.8
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.5 for Moodle
A very easy to use Cloze question type that supports drag/drop answers that work on mobile devices. Teachers can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5, 2.6 and 2.7.
It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
Version 1.5 added support for gaps that are marked correct if left empty using !!, and fixedgapsize
1.4 (2006082512)
1.4
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082512
Version release name: 1.4
Maturity: Stable
Supported Moodle versions:
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.4 for Moodle
A simpler Cloze question type that only supports fill the the blank type questions.
Teacher can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5 and 2.6. It has also been tested with Moodle 2.4.
It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
Version 1.4 added support for touch devices such as Apple iOS phones and tablets (iPhone/iPad) and Android devices
1.3 (2006082511)
1.3
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082511
Version release name: 1.3
Maturity: Stable
Supported Moodle versions:
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.3 for Moodle
A simpler Cloze question type that only supports fill the the blank type questions.
Teacher can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5 and 2.6. It has also been tested with Moodle 2.4.
It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
1.3 (2006082510)
1.3
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082510
Version release name: 1.3
Maturity: Beta
Supported Moodle versions: 2.4, 2.5, 2.6
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type V1.3 for Moodle
A simpler Cloze question type that only supports fill the the blank type questions.
Teacher can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display
a shuffled selection of correct and wrong answers. These can then can be selected via
dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5 and 2.6. It has also been tested with Moodle 2.4.
It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
Version 1.3 toggle regex for plain string compare. Useful for maths, html and programming language questions
1.2 (2006082509)
1.2
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082509
Version release name: 1.2
Maturity: Stable
Supported Moodle versions: 2.4, 2.5
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type for Moodle V 1.2
A simpler Cloze question type that only supports fill the the blank type questions.
Teacher can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and wrong aanswers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality.
This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5. It has also been tested with Moodle 2.4.It will not work with versions of moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode
Version 1.2 will colour duplicate answers yellow when discard duplicates mode is used (see help)
1.1 (2006082508)
1.1
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082508
Version release name: 1.1
Maturity: Beta
Supported Moodle versions: 2.5
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type for Moodle V 1.1 A simpler Cloze question type that only supports fill the the blank type questions. Teacher can define the question with square braces to define the missing words. For example The [cat] sat on the [mat].
Alternative delimiting characters can be defined during question edit for example The #cat# sat on the #mat# can be valid. If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of correct and wrong aanswers. These can then can be selected via dropddropdown lists or javascript powered drag and drop functionality. This question type was written by Marcus Green
This question type was created and tested under Moodle 2.5. It will not work with versions of moodle prior to 2.1 but it will probably work with versions between 2.1 and 2.5 (though you would need to edit the version.php file.
Place the files in a directory moodle\question\type\gapfill Where moodle is webroot for your install.
Version 1.1 includes a count of correct answers and clears incorrect responses in interactive mode and is updated to use the Moodle 2.5 style forms.
1.0 (2006082507)
1.0
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082507
Version release name: 1.0
Maturity: Stable
Supported Moodle versions: 2.1, 2.2, 2.3, 2.4
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type for Moodle
A simpler Cloze question type that only supports fill the the blank type questions.
Teacher can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of
correct and wrong aanswers. These can then can be selected via dropddropdown lists or javascript powered drag and
drop functionality. This update fixes a bug where wildcards were not working in interactive mode.
This question type was written by Marcus Green
This question type was created under Moodle 2.2 and tested with 2.3 and 2.4 It will not work with versions of
moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.
1.0 (2006082506)
1.0
Plugin type: Question types
Frankenstyle component name: qtype_gapfill
Version build number: 2006082506
Version release name: 1.0
Maturity: Beta
Supported Moodle versions: 2.1, 2.2, 2.3
Repository URL (Git): https://github.com/marcusgreen/moodle-qtype_gapfill
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/marcusgreen/moodle-qtype_gapfill/issues
Gapfill question type for Moodle
A simpler Cloze question type that only supports fill the the blank type questions.
Teacher can define the question with square braces to define the missing words. For example
The [cat] sat on the [mat]. Alternative delimiting characters can be defined during question edit
for example The #cat# sat on the #mat# can be valid.
If the dropdown or dragdrop options are set in the question edit form, it can display a shuffled selection of
correct and wrong aanswers. These can then can be selected via dropddropdown lists or javascript powered drag and
drop functionality.
This question type was written by Marcus Green
This question type was created under Moodle 2.2 and tested with 2.3 It will not work with versions of
moodle prior to 2.1.
Place the files in a directory
moodle\question\type\gapfill
Where moodle is webroot for your install.