Quiz

by Gisle Hannemyr

The Quiz module allows you to create quizzes on a Drupal site. These may be for amusement, or as part of an online course. It allows you to create quizzes containing questions with multiple formats and has an API that allows you to add more. This chapter is based upon version 7.x-5.x of the project.

Table of contents

Drupal modules discussed in this chapter: Quiz.

Introduction

The Quiz is very powerful and flexible, but also quite confusing at first.

Installing and enabling the module

Start out by downloading the latest version of the 7.x-5.x-dev branch a well as all the supporting modules we shall require:

# drush dl quiz-7.x-5.x-dev -y
# drush dl ctools -y
# drush dl entity -y
# drush dl rules -y
# drush dl views -y
# drush dl views_bulk_operations -y

We're going to start out with a minimal configuration, with just a single question type (Multichoice). Enable the following modules (Drupal will sort out the dependencies):

We'll be asked to rebuild permissions. Do it!

This will add two new content types to the site:

Before creating content of these types, you may want to tweak some of the content type settings. Here's my standard tweaks:

Creating a multiple choice question

To start creating a multiple choice question, we create an entity of the Multiple choice question content type.

Note that the Question is different from the Title. The title is a descriptive name that lets the us locate the question in the administrative GUI. It is not shown to the user. By default, it is automatically set to the same text as the question.

The format even allow for a short version of the question (a teaser). You may specify that the teaser should be shown insted of the full version under “Review options”.

To try it out, enter the following as the question: “In what country did Drupal originate?”.

Then enter the following four answer options:

Mark “Belgium” as the correct answer. Under Settings checkmark the following:

You may also provide Question feedback. This is text that is always shown along with the answer, and may be used to point out what material to re-read to get it right.

The press Save.

Creating or editing a new quiz

To start greating a quiz, we create an entity of the Quiz content type. We need to give the quiz a descriptive name (Title) and a brief introduction (Body). In addition to the standard vertical tabs that is attached to most Drupal content types, there are four groups of options for specifically for a quiz:

  1. Taking options – a large number of options to customize taking the quiz.
  2. Result feedback – feedback to give for five ranges of results
  3. Pass/fail options – set the passing rate for quiz.
  4. Availability options – open and close dates (requires the Date Popup module).

These options can be changed for existing quizes just by editing the quiz, but changing them only have affect on new results.

Taking options

A large number of options to customize taking the quiz. They are not very well organized – but this is what the module has to offer.

The first 10 or so options are not placed inside a section box, but are options that may restrain (or not) the user's navigation through the questions of the quiz, how to process muktiple takes, etc.

They are followed by a boxed section called “Review options”. The options within this section controls what feedback appears and when. You may provide feedback after each question, or after the quiz has been completed. Here is a rundown of the options:

Each question has three groups of options.

The first group is shown above the table created from the second group and may consist of the following::

The second group is a table. The table always has a rightmost column called “Your answer” with a large left-pointing arrow indicating the row of the user's answer. This is rather pointless if none of the six columns shown below are activated:

The third group is question feedback. If present, it appears below the table.

These three groups are repeated for each question.

The final section appears below the question list, and covers the whole quiz, not individual questions:

Enabling an option after the quiz creates an intermediate screen with the information. For this reason, these options seems to work best after the quiz has been completed.

The next boxed section is called “Multiple takes”. It let us control the following:

Finally, outside any section box, there is a single option to set a maximum time limit for the quiz.

Result feedback

This allows you to set a range title (grade) as well as verbal feedback to give for five ranges of results. The ranges are selected by percentages.

Pass/fail options

Set the passing rate for quiz as a percentage, along with text to display for pass or fail.

Availability options

Open and close dates (requires the Date Popup module).

Quiz permissions

Quiz configuration

The Quiz project has its own configuration menu. It appears in the black band of the standard Drupal administrative toolbar.

Quiz feedback

Default quiz feedback behaviours for each quiz is set on the edit page for the quiz. This is used for more advanced feedback controlled by conditions.

Quiz reports and scoring

Disabled (View reports and score answers.)

Quiz result

Here, you can configure how Quiz attempts and results behave. It allows you to add fields and manage displays (i.e. field visiility).

Quiz result answer

Here, you can configure how Quiz result answers behave. It has a similar interface as the previous item and allows you to add fields and manage displays (i.e. field visiility).

Quiz settings

This lets you change various settings for the all Quiz project modules.

For example it lets you set the default number of alternatives for multiple choice questions and the default scoring method.

Final word

[TBA]


Last update: 2016-01-31 for D7 [gh].