Quiz
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):
- Quiz
- Quiz Question
- Quiz Multichoice
We'll be asked to rebuild permissions. Do it!
This will add two new content types to the site:
- Multiple choice question
- Quiz
Before creating content of these types, you may want to tweak some of the content type settings. Here's my standard tweaks:
- Display settings: Do not display author username and publish date..
- Comment settings: Closed.
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:
- Belgium
- Germany
- Holland
- USA
Mark “Belgium” as the correct answer. Under Settings checkmark the following:
- Random order
- Simple scoring
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
.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:
- Taking options – a large number of options to customize taking the quiz.
- Result feedback – feedback to give for five ranges of results
- Pass/fail options – set the passing rate for quiz.
- 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::
- Question: Full content – Show the full question.
- Question: Teaser – Show the teaser (checking both “Question” options results in both being displayed.)
- Attempt – (does not seem to work – so I don't know what it is supposed to do).
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:
- Choices – the text of the choice (i.e. candidate for the correct answer).
- Whether correct – a green or red checkmark indicating wheteher the choice is correct or not.
- Score – a numberic score. By default, it gives the same information as “Whether correct”, but may be tweaked.
- Answer feedback – text pulled from the answer feedback (advanced) from the question.
- Correct answer – this adds a checkmark column that shows a checkmark indicating the right answer. It may be inferred from “Whether correct”.
The third group is question feedback. If present, it appears below the table.
- Question feedback – The field “Question feedback” in the question.
These three groups are repeated for each question.
The final section appears below the question list, and covers the whole quiz, not individual questions:
- Quiz feedback – the “Summary text …” from “Pass/fail options” and “Feedback” from “Result feedback”.
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:
- How many times each user is allowed to attempt the quiz (1-9 + unlimited).
- Whether to display the allowed number of attempts on the starting page for the quiz.
- How to store results from multiple takes (best, newest or all). However, this buggy. The current dev version (2016-01-29) only works with all if you limit the number of attempts.
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
- Administer quiz configuration: Control the various settings and behaviours of quiz. (Warning: Give to trusted roles only.)
- Take quiz: Can access (take) all quizzes. [Auth.]
- View any quiz results: Can view results for all quizzes and users.
- View own quiz results: Quiz takers can view their own results, also when quiz is not passed. [Auth.]
- View results for own quiz: Quiz makers can view results for their own quizzes.
- Delete any quiz results.
- Delete own quiz results.
- Score any quiz.
- Score own quiz.
- Score taken quiz answer: Allows attendee to score questions needing manual evaluation.
- View quiz question outside of a quiz: Questions can only be accessed through taking a quiz (not as individual nodes) unless this permission is given.
- View any quiz question correct response: Allow the user to see the correct answer, when viewed outside a quiz.
- Edit question titles: Questions automatically get a title based on the question text. This allows titles to be set manually.
- Manual quiz revisioning: Quizzes are revisioned automatically each time they are changed. This allows you to do revisions manually.
Quiz configuration
The Quiz project has its own configuration menu. It appears in the black band of the standard Drupal administrative toolbar.
- Quiz feedback: Configure Quiz feedback behaviours
- Quiz reports and scoring: View reports and score answers.
- Quiz result: Configure Quiz result behaviors
- Quiz result answer: Configure Quiz result answer behaviors
- Quiz settings: Change settings for the all Quiz project modules.
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].