Skip to main content
Drupal Quiz

Cloze module for Drupal Quiz

KnackForge has been offering professional support to many of the Drupal sites that are using quiz module. In this endeavor we have developed a new cloze module for one of our potential clients. The module essentially adds a new question type to conduct Fill in the blanks kind of Quiz. In eLearning parlance it is also known as cloze test.

Wikipedia describes the cloze test as follow,
A cloze test (also cloze deletion test) is an exercise, test, or assessment consisting of a portion of text with certain words removed (cloze text), where the participant is asked to replace the missing words. Cloze tests require the ability to understand context and vocabulary in order to identify the correct words or type of words that belong in the deleted passages of a text. This exercise is commonly administered for the assessment of native and second language learning and instruction.
Usecase: For instance if an instructor wants to evaluate the grammar skills of his student, he could prefer to use cloze question as mentioned below,
The Sun raises in ___ east and sets in the ____.
When taking the quiz, the student will have to fill "the" and "west" in the appropriate blanks.
This can be seen as an extended version of short answer question. More about the working of this module, like other question type modules in quiz, cloze offers a new node type. In the body field of the node question text could be feed. The question text will have some missing words, the student will have to fill the appropriate word at the time of taking quiz.
There are two types of blanks,
  • the free text blank (input type textfield), where student can write whatever he wants
  • the choice blank (dropdown), where student will have to choose the word from a list of items
In order to create the cloze quiz, the instructor will write the question text in the body field of cloze node. To keep it simple we support only plain text questions for now and hence the input format selection will not appear.
Where there should be a blank, the instructor will put square brackets. 
  • If it is a free text blank, inside the brackets the right word will be mentioned 
  • If it is a choice blank, mentioned will be all the options separated by commas; the first one is the correct one; every time the question is shown the words are randomly ordered.
Example : [The] quick brown fox jumps [over, on, in, beneath] the lazy dog
A valid cloze question would look as below on create/ edit screen,
After creating a cloze question, when seen outside the quiz context it will be shown as below,
When taking the quiz,
The score is computed as the number of correct answers over the number of blanks. By default the maximum score is 10. In the report page we show the complete text with the words inserted by the student, and correct words side by side.
The final report page would look as below,
The module currently supports only Drupal 6.x.


Looks great (not verified)

Fri, 10/19/2012 - 17:17

Hello,This looks great!The project page just lists a D6 release. Any plans to port this to D7 Quiz module?

@Alex Weber, You are welcome :-)@Looks great, Our client is still using Drupal 6 so to begin with we developed cloze for the same. When the need it felt we will certainly port it to Drupal 7.

stillblue (not verified)

Fri, 05/24/2013 - 03:54

The free text blank is not working for me. A correct answer is marked as incorrect. How can this be solved?

I love the cloze module, I also appreciate your effort.
The challenge i have about the cloze module is that the Correct option must be mention first,
Students can easily take note of the weakness in the quiz, and just be picking the first option.
Can there be a way around this, that the examiner can change the options

@Farrisimin, thank you!@stillblue, that was fixed in dev branch please check that and report if the problem is still there@Simeon, I'm not sure if I understand your comment. The options are shown in random order so I'm not sure where the weakness is.

The correct answer (option) must be mentioned first, this is weakness in the multichoice cloze question, this is a weakness in the cloze module.... There should be work around such that the correct answer is randomly placed in option available not as the first answer.
I hope you understand what i am saying now

ktripp (not verified)

Fri, 02/20/2015 - 15:50

Hi Sivaji,

I am really enjoying this module! Is there a way to change it so that way questions have to be manually graded instead of scored by the computer?


Simeon (not verified)

Wed, 07/15/2015 - 11:44

Since quiz 5 is out, I have tried my hands on it and especially the new feature (quiz pages). I quite love that feature because it allows multiple questions to place on one page. The challenge now is that quiz_cloze module doesn't seem to well seamlessly with Quiz 5. Is there any hope that this will be fixed very soon. making quiz_cloze module to work with quiz 5.