TinyMCE: Cloze Editor

Maintained by Picture of Andreas Glombitza Andreas Glombitza, Picture of Germán Valero Germán Valero
An interface that integrates with Moodles existing HTML editor (HTMLArea in 1.9 and TinyMCE in 2.x and 3.x) to support teachers in creating CLOZE (Embedded answers) questions in the GIFT syntax. It will also read and edit existing CLOZE items.
996 sites
17 fans
Moodle 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3

The integration (PHP/javascript) is essentially a new button in the HTML editor which brings up an interface that helps create CLOZE questions in the correct syntax. It will also read and edit existing CLOZE items (which you have selected with your cursor).

Here's a demonstrator (which can also be used to create your own CLOZE quizzes):


For installation instructions and more, see the "More documentation on this plugin" link below.


Screenshot #0


Picture of Andreas Glombitza
Andreas Glombitza (Lead maintainer)
Picture of Germán Valero
Germán Valero: Documentation, translation and testing
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Health & Safety Training Ninja
    Fri, 28 Aug 2015, 9:17 PM
    This plugin doesn't appear to work on Moodle 2.3.11 - the lib.php file is not contained within moodle version 2.3.11 here: lib/editor/tinymce/lib.php. The instructions say this file will be overwritten with a modified version. But, there's nothing to overwrite. So, I assume as moodle 2.3.11 does not contain this file natively, nothing is being over written and the lib.php file is not in use; and is the reason it the editor does not display the icon to use the closeditor.
  • Picture of Germán Valero
    Sun, 30 Aug 2015, 12:31 AM
    Hi Steve,
    As for Moodle 2.3.11, according to https://download.moodle.org/releases/legacy/ Support for the 2.3 branch has been discontinued. We highly recommend you upgrade!

    If you do upgrade your Moodle server, please notice that the CLOZE plugin only works with the TinyMCE editor and the newer Moodle branches have the Atto editor as default. Please see the documentation at https://docs.moodle.org/29/en/Cloze_editor_module

    If you can not upgrade, maybe you can use the free online CLOZE editor available at http://projects.ael.uni-tuebingen.de/quiz/htmlarea/index.php .

    As the 2.3 Moodle branch is very old, I do not currently have one such server available for testing, and it might take me a while to install one and look into your issue.
  • Picture of Ellen Spertus
    Sat, 26 Sep 2015, 12:07 AM
    Thanks for making this available. I am using Moodle 2.9.2 and TinyMCE 3.5.1. There is a lot in my lib/editor/tinymce/lib.php file, including changes I made to add other plugins. Could you give me any guidance on how to integrate your lib.php into my existing lib.php? Thanks.
  • Picture of Đinh Lư Giang
    Fri, 9 Oct 2015, 11:30 AM
    Does it work for Moodle 2.9, this excellent plugin?
  • Picture of Germán Valero
    Fri, 20 Nov 2015, 1:38 AM
    I had forgotten to mention that this plugin works with Moodle 3.0 stable branch as long as TinyMCE is selected as the Text editor instead of Atto smile
  • Picture of Gorn ---
    Mon, 7 Dec 2015, 5:28 PM
    Hi there,

    since Atto is going to be Moodle's standard editor from now on, will the next installments of the cloze editor work with Atto too? With TinyMCE no longer being the main editor, there's no guarantee new Moodle versions will continue to have it included, so cloze might have to make the switch to Atto anyway?
  • Picture of Toni Kettunen
    Tue, 9 Feb 2016, 3:01 PM
    Would it be possible to add the new 3.0 shuffle questions to the editor? https://docs.moodle.org/30/en/Embedded_Answers_%28Cloze%29_question_type#Format
  • moodler
    Wed, 10 Feb 2016, 9:46 PM
    Hi there,
    I installed this plugin on a Moodle 2.9, i can see the "?" button in tinyMCE editor, when using it the wysiwyg tool seems to work well (it generates a gift code as expected).
    But when I save the page, the result doesn't display any form, it simply display the gift code (like : {1:SHORTANSWER:%100%MyAnswer#}).
    I didn't see any specific setting to change in plugin documentation, "tinymce_clozeeditor" is correctly installed and activated, is anyone experiencing the same problem ?

    PS : During installation, I was surprised to see there's only a tinyMCE subplugin to install, I expected to have to deploy also a filter plugin (to transform the gift code to form while displaying the content saved within tinyMCE) but obviously this job is also supposed to be made by the "tinymce_clozeeditor" plugin ... ?
  • Picture of Andreas Glombitza
    Wed, 10 Feb 2016, 10:27 PM
    Dear Gabriel,

    the GIFT-codes generated by the CLOZE-editor are interpreted by Moodle's quiz-module parser (on PHP-level), not by a filter. The codes are parsed when the quiz is started, not beforehand, and the process is completely independent from the CLOZE-editor (to be exact: there is a second parsing mechanism "inside" the editor, which allows you to edit highlighted codes after encoding; this mechanism is "reverse engineered" from the quiz-module's parser, and independent from it).

    For clarification:
    When you are using the editor and "encoded" one or more items, it is expected behaviour that you see the codes generated by the editor (instead of the forms generated from them later by the quiz module).

    The proper forms (dropdown etc.) should be displayed when you start the quiz, however. After you save your questions and start the quiz, does it still display the codes instead of those forms?

    In that case, you should go back to the editing window and check the GIFT-Syntax in sourcecode. Sometimes, "invisible" HTML/CSS-formatting instructions (span tags etc.) generated by tinyMCE interfere with the GIFT-syntax, so that the quiz-module parser cannot resolve them properly.

  • moodler
    Wed, 10 Feb 2016, 11:31 PM
    Dear Andreas,
    Thank you for your quick answer and all those interesting information, your plugin works well and is very usefull, congratulation for the job you made.
  • Russell Cunning
    Tue, 15 Mar 2016, 8:04 AM
    Hi Andreas,
    I have just used your online Cloze editor, and decided to install the plugin. The plugin installed successfully. When I click on it a new window pops up just like your online editor - but all that is in the window is a 403 error.
    I'm hosted on a LiteSpeed server, which has caused issues with some of my WordPress plugins in the past - but I have no idea where to start looking for what could be wrong. Do you have any ideas? I love the tool, and in the worst case scenario, I can still use your online editor.
  • Picture of Andreas Glombitza
    Tue, 15 Mar 2016, 9:53 PM
    Dear Russell,

    it's hard to diagnose from a distance, and I have no experience with a LiteSpeed server, but it sounds as if the files are not in the correct directory. You may want to double-check the file locations with the paths listed in the Readme-file.

  • Picture of Germán Valero
    Tue, 16 Aug 2016, 2:54 AM
    Now there is also a cloze editor for Atto available for download (Moodle 2.7 to 3.1) at https://moodle.org/plugins/atto_cloze smile
  • Picture of Germán Valero
    Fri, 11 Nov 2016, 12:23 AM
    Tested to work on Moodle 3.2 beta (Build: 20161108) on November 10th 2016 smile
  • Picture of Germán Valero
    Tue, 25 Apr 2017, 11:31 PM
    Tested to work with Moodle 3.3 beta (Build: 20170421) on April 25th 2016.
1 2
Please login to post comments