TinyMCE: Cloze Editor

Maintained by Picture of Andreas Glombitza Andreas Glombitza, Germán and temudgin 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.
1364 sites
29 fans

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.

This plugin only works with the TinyMCE editor.

Daniel Thies made a very nice CLOZE editor plugin for Atto.


Screenshot #0


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

Comments RSS

Show comments
  • 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.

  • Germán and temudgin
    Thu, 26 Oct 2017, 10:28 PM
    Tested to work beautifully with Moodle 3.4beta (Build: 20171025) on 26th october 2017 smile
    Remember to change your preferred editor to TinyMCE smile
  • Germán and temudgin
    Thu, 26 Oct 2017, 10:33 PM
    Now there is also a cloze editor for Atto available for download (Moodle 2.7 to 3.4) at https://moodle.org/plugins/atto_cloze smile
  • Patrick Viney au MoodleMoot de Nîmes
    Fri, 15 Dec 2017, 12:28 AM
    Thank you for keeping up to date this great plugin. However, due to French localization, the pop up window I have is not wide enough. I can't find where to change the default width of this window in CSS. Can you help me ?
    Here is a screenshot : http://bit.ly/2j4EU3D
  • Germán and temudgin
    Sat, 16 Dec 2017, 11:07 PM
    Hi Patrick.

    The problem is not the french language localization. I just tested it in a new 3.4 local server in both french and mexican Spanish and it works OK.

    See the French and Spanish images at https://docs.moodle.org/34/en/Cloze_editor_for_TinyMCE#Other_languages

    Have you tried with a different browser?
    or from a different computer with a larger image display size?
  • Patrick Viney au MoodleMoot de Nîmes
    Mon, 18 Dec 2017, 10:02 PM
    Hi Germán,

    You're right, it depends a lot on the browser and computer that you use !

    I've tried with both Mac and PC computers, on several browsers, and it's not quite satisfying since it appears wrong on most of them. See this image where I made the comparison : https://tinyurl.com/y7t2hj3q
    (I kept 100% zoom on browser's screen for each screenshot)
  • Patrick Viney au MoodleMoot de Nîmes
    Mon, 12 Feb 2018, 10:55 PM
    Ok, we finally found out where to fix the width of this window :
    There, change width (originally 490) to 620.
    Don't forget to clear all caches : both browser AND Moodle caches
  • Germán and temudgin
    Sat, 28 Apr 2018, 12:21 AM
    Successfully tested to work with Moodle 3.5beta (Build: 20180425), in both Boost and Clean themes, on April 27th 2018. Remeber to choose TinyMCe as your upmost (preferred) text editor smile
  • Germán and temudgin
    Sun, 10 Jun 2018, 6:44 AM
    New plugin version v3.5-r1 (2018060916) for Moodle 3.4 and 3.5 branches released today.
    Added support for Privacy API.
    It has a wider window in order to fix the problem described by Patrick Viney smile
    Remember to choose TinyMCe as your upmost (preferred) text editor smile
1 2 3
Please login to post comments