Cloze editor for Atto

From MoodleDocs
Revision as of 13:11, 1 July 2023 by German Valero (talk | contribs) (Updated some information in this old page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a Moodle (2.7 to 4.2) contributed (third party) additional plugin, written by Daniel Thies, for easily making Embedded Answers (Cloze) question type inside the standard Moodle Atto text editor.


  • This is a very user-friendly contributed plugin for the Atto editor for Moodle branches 2.7 up to 4.2.
  • You can now have the power of the Embedded Answers (Cloze) question type without having to memorize the cloze syntax.
  • A popup window will let you choose any one of the available question types to be embedded. A description of the question type is shown in your own language, for you to easily choose the best question type to use.
  • A 'Duplicate' button lets you easily and quickly write variants of a question, while keeping the distractors and feedback you had previously written, thus saving your valuable time !


Sites using cloze editor plugin for TinyMCE.png

  • Since April 2014, Moodle 2.7 and newer branches (up to 4.1) have Atto as the default editor, but TinyMCE can still be raised as the user editor in the user preferences as explained in a Moodle Docs page.
  • As of July 2016, two thirds of all registered Moodle sites are using versions 2.7 and higher!

All Moodle registrations by version in july 2016.png

  • There was a very energetic exchange of opinions in one Moodle forum thread about improvements on the cloze question type
  • Daniel Thies kindly volunteered to write a cloze editor for Atto, wrote the first version and improved on it for one month.
  • It has been extensively tested in all Moodle branches from 2.7 to 3.4, in several languages.
  • Several user-friendly features have been incorporated into the current version.
  • This Moodle Docs page was started to help new users of this plugin.

Current status

This plugin is available for installing or downloading from the Moodle plugins database.

Moodle branches supported

Moodle 2.x, 3.x 4.0 and 4.1 are supported.

Moodle branches not supported

  • Moodle 2.6 and 2.5 branches: Even if you first install the Atto editor additional plugin, there is no way to configure the Atto toolbar to show the cloze button. This version of Atto is a very early version of Atto and is not the same as the one that was shipped with 2.7. That is why there is no config for it.
  • Moodle 4.2 no longer has the old TinyMCE editor included.

Languages supported

All Moodle 2.x and 3.x languages supported by AMOS are supported by this plugin. If you do not see the translations of the different question types descriptions, please ask your language pack maintainer.


Automatic installation from the Moodle plugins database

This plugin is available for installing or downloading from the Moodle plugins database.

Atto cloze editor available in Moodle plugins database.png

Manually installing from GitHub

  • Go to and download the ZIP file
  • Add the contents of this downloaded zip file in '... -> server-> moodle -> lib -> editor -> atto -> plugins ' directory and visit notifications to update database."
  • You must rename the 'moodle-atto-cloze-master' folder into 'cloze'
  • After visiting notifications and updating the Moodle database, you must add the cloze button cloze icon.gif to the Atto toolbar as described in adding the line cloze = cloze .

Cloze editor for Atto toolbar config add cloze = cloze.png

  • You may not notice any change because by default, the Atto toolbar has very few buttons showing:

Atto toolbar with few tools.png

  • Then, click on the very first button inside the Atto toolbar to expand the Atto toolbar:
  • Now, when you expand the (normally small) Atto toolbar, you will see the cloze icon.gif familiar cloze button.

Atto toolbar with many tools.png

  • You can now click on the cloze icon.gif button to open the cloze editor popup window.



Add a Cloze question type.png

  • You will have the Atto editor for writing your new question:

Make a question using Atto.png

  • Notice the following image where you must click on the (red square) first Atto button in order to expand the Atto toolbar, so that it shows the cloze icon.gif cloze plugin button (green square):

Make a question using Atto expand toolbar.png

  • When you click on the cloze button inside the Atto toolbar, a popup window will let you choose any of the available question types. When you choose any question type, you will see a plain language description of what that question type does:

Cloze editor screen with add and cancel buttons.png

Note: The English language strings with the descriptions of the available question types are available for translation in AMOS. So, if you are using Moodle in a language other than English, you may see these descriptions in your home language

ES Cloze editor screen with add and cancel buttons.png

  • Select the question type you want to use and click on the 'Add' button:
  • If you had previoulsy blocked some text just before clicking on the cloze tool button, this text will be automatically inserted as the first correct answer.

ES Cloze editor selected text inserted automatically as first answer.png

  • Notice that in the image above, the previously blocked word 'elephant' (green rectangle) was automatically inserted as the first correct answer (blue rectangle).

Duplicate a question using the same distractors and feedback

  • There is a 'Duplicate' button on the chooser that loads the previous answers.
  • The form will then populate with the same data as the previous question you just recently made.
  • The advantage of having this is for producing several multichoice questions with the same distractors and feedback.
  • This is specially useful if you want to create a matching type question.

Cloze editor screen with button to duplicate answers.png

  • You can create several variants from one original question very quickly:

cloze question plus two variants.png

A very simple English literature question example tutorial

  1. Find an interesting text. Let's use a nice little poem, 'To make a praire', by Emily Dickinson.
To make a prairie it takes a clover and one bee,
One clover, and a bee.
And revery.
The revery alone will do,
If bees are few.
  1. Copy the text from an available public domain quote.
  2. Make a new question using the cloze question type.
  3. Paste the poem inside the box for the question text.
  4. Select one interesting word, 'prairie'.

cloze english literature 01.png

  1. Then click on the Atto cloze tool and select a MULTICHOICE question.
  2. Write a couple of good distractors; e.g., hill, lake.

cloze english literature 02.png

  1. Now in the final sentence, select the word 'bees' in 'if bees are few'.
  2. Now make a SHORTANSWER question.

cloze english literature 03.png

cloze english literature 04.png

  1. Save the question.
  2. Preview the question and check that t works as expected.

cloze english literature 05.png

A very simple medical clinical case question tutorial

  1. Read the excellent publication 'Constructing Written Test Questions For the Basic and Clinical Sciences' by the (US) National Board of Medical Examiners. Please see specially Section II: Writing One-Best-Answer Questions for the Basic and Clinical Sciences (pages 32 to 43 ).
  2. We will use the following very short sentence as an example:
Acute intermittent porphyria is the result of a defect in the biosynthetic pathway for heme.
  1. With this sentence, we will create several variant questions using the cloze editor.
  2. We must first create a category named ´porphyria' in our Question bank. Here we will store our new questions.
  3. Then we will create the questions, one at a time.
  4. For the first question, we will highlight 'porphyria' and make a cloze SHORTANSWER question.
  5. In order to make the second variant question, we will highlight 'a defect' and select MULTICHOICE, using the distractor wrong options of 'an increase', 'an atrophy' and ' a toxic blockage'.
  6. For the third variant, we will highlight 'heme' and make another SHORTANSWER question.
  7. We have stored these three different (variant) questions inside the previously made category named ´porphyria'.
  8. In a quiz we will use only one random question from this category, so that our medical students will randomly get one variant question for this problem.
  9. The most common simple cheating is discouraged (a little), because if the students tell each other that 'the answer for the porphyria question is heme', it will not make sense to the students that were asked to choose a defect in the biosynthetic pathway.
  10. We proceed similarly for 50 more clinical problems and create 3 variants for each problem. All variant questions for each subject are stored inside the corrresponding subject category.
  11. We should, of course, use real clinical cases from our own archives and maybe add a few gross, microscopic and radiographic images if appropriate.

... to be continued...

Available question types

MULTICHOICE Cloze multichoice.png

MULTICHOICE_H Type multichoice h.png

MULTICHOICE_V Type multichoice v.png

NUMERICAL Cloze numerical.png

SHORTANSWER Cloze shortanswer.png

The following question types with an S in their names denote that the question behavior shuffle option (randomize the order for displaying the answers) is on:

MULTICHOICE_S Type multichoice S.png

MULTICHOICE_HS Type multichoice hs.png

MULTICHOICE_VS Type multichoice vs.png

See also