Don’t forget to subscribe to our YouTube channel to stay up-to-date.
The video above explores two different methods for creating engaging quizzes in Drupal CMS. Whether you want to test user knowledge or boost engagement, Drupal provides flexible solutions for quiz creation.
The guide below explains the Quiz module and Webform Quiz Elements, their key differences, and step-by-step instructions for implementing each option.
What are Drupal Quiz Solutions?
Drupal provides two primary methods for creating quizzes:
- Quiz Module: A robust solution featuring various question types and advanced capabilities.
- Webform Quiz Elements: A simpler option integrated with Drupal’s Webform system.
Quiz Module
The Quiz module is a full-featured solution designed for creating complex assessments. It suits learning management systems (LMS) or detailed customer engagement tracking.
Key Features of Quiz Module
- Multiple question types (Multiple Choice, True/False, etc.)
- Detailed feedback options
- Question bank functionality
- Customizable scoring system
Getting Started with Quiz
You’ll need to download and install the Quiz module to get started.
You can find the module through the “Extend” section in Drupal’s backend using the “Browse Modules” feature. Search “quiz” to find it.

Or you can install it using the Composer command:
composer require 'drupal/quiz:^7.0'
From the Extend page, enable the following modules:
- Quiz
- Quiz – multichoice
- Quiz – true false
Quiz Dashboard
Once you’ve enabled the modules, you should see Quiz in the toolbar.

Click on the Quiz link to be redirected to the main configuration page.
Here, you can configure different elements, such as quizzes, questions, results, answers, and feedback types.

You can create quizzes and view results.
Create Quiz
To create your first quiz, click on Quizzes and click “Add Quiz.”

Give it a title (e.g., “Do you know Drupal?”) and a description.

There are many configuration options on the create quiz page.
The important ones to take note are the following:
- Taking options
- Availability options
- Pass/fail options
- Question feedback

Add Questions
Click on the Questions tab, then “Create new question”.
You will see a list of available question types.

When adding a question, you must add it to both the title and question fields. The title field is for internal use only and is not visible in the quiz on the front end; only the question text area is shown to users.

For the multiple choice question, add in the answers and make sure you select the correct answer.

Every question type is slightly different, but generally, you must add the question and answers and then select the correct answer.
The true/false question looks like the following:

Add passing grade
To set a passing grade, edit the quiz go to the “Pass or Fail Options” and set a required percentage (e.g., 75%). You can also add a congratulatory message for those who pass.

Complete quiz
You can preview and test the quiz. Make sure you have the correct permissions to access it.
Click on the View tab or go directly to it by navigating to “/quiz” followed by the quiz ID.

The first page will include the number of questions, attempts permitted, passing grade, and navigation options.
You can start the quiz, select answers, and navigate between questions.

When finished, submit your answers.

Editing questions with answers
If a user has already attempted the quiz, you cannot modify the questions or quiz options.
A message will indicate that there are existing attempts for the quiz.

To make changes, you must either create a new revision of the questions or delete the existing results.
Customize quiz feedback results
Let’s look at customizing the results page, which is shown after finishing the quiz.
Edit the quiz and click on the “Question feedback” tab.
Enable the following:
- Question: question
- Choices
- Score
- Correct answer
- Quiz feedback

You can also add “Quiz Result Feedback” based on score ranges.
For example, add a message like “Great job!” for scores between 50% and 100%.
Enable “Quiz Feedback” if you add these custom messages.

This feedback configuration also controls the administrator’s view of the results.
View Results
To view the quiz results, click on the Results tab to see all completed and attempted quizzes.

Results can also be viewed from the quiz configuration page (/admin/quiz).

Reusing questions
Questions can be reused in other quizzes.
Existing questions can be reused when adding them to a quiz. To do so, click “Add Questions from bank,” allowing you to select existing questions.

However, you cannot edit a reused question if it already has associated answers.
Deleting or removing question
If you want to get rid of a question, you can do it in two ways: by removing or deleting it.
You can delete a question by editing it and clicking the delete button, but be aware that this will permanently delete it.

You can remove a question from a quiz, which is handy for reusing questions across multiple quizzes.
If you wish to take out a question from one quiz, just click “Remove” in the operations drop-down menu on the questions page.

NOTE: Deleting and removing a field is treated differently.
Question types
The quiz module comes with the following question types:
- Long answer question
- Matching question
- Multiple choice question
- Short answer question
- True/false question
A submodule controls each question type, so you must install the corresponding submodule.

Webform Quiz Elements Module
If you’re new to Webform and want to learn the basics before diving into quiz elements, check out our beginner-friendly tutorial “Getting Started with Webform in Drupal“
If you already use the Webform module, “Webform Quiz Elements” offers a more straightforward, lighter-weight option.
This module provides quiz functionality using radio buttons. It is a good option if you don’t need advanced questions.
Key Features of Webform Quiz Elements Module
- Radio button support
- Perfect for simple quizzes
- Easy to get started if you have Webform installed
Getting started with Webform Quiz Elements
Before using Webform Quiz Elements, ensure you have downloaded and installed the Webform module.
Then, proceed to download Webform Quiz Elements using Composer:
composer require 'drupal/webform_quiz_elements:^1.0'
NOTE: As of this video’s recording and the tutorial’s writing, Webform Quiz Elements did not appear on the Browse Projects page when using Drupal CMS. You will need to download them using Composer.
Create Quiz in Webform
To create a quiz, begin by creating a Webform.
Click on add element and search for “quiz” and use the “Radios (quiz element)” element for the question.

Add your options in the element options section.

Then, you need to define your quiz options in YAML format. This is where you specify which option is correct or incorrect, and you can display feedback based on the selection.
You can show messages such as “This was incorrect” or “This answer is correct.”

To avoid syntax errors in the quiz options, ensure your YAML formatting is precise and validate it using a YAML checker.
Displaying results and score
Use the “Result (per quiz element)” element to display the results of a single question.

You can control whether the results are displayed on the form visible to users while they fill it out, or only on the submission page, by selecting an option from the “Display on” drop-down.

To display a total score of the quiz, use the “Quiz total score” element.

A passing grade can be added, along with success and failure messages.
View Submission Results
To view the total score and results of the quiz, you must add both “Quiz total score” and “Result (per quiz element)” to the form to see the results on the submissions page.

Summary
The Quiz module is a powerful solution with many configuration options but requires more setup and additional dependencies.
Webform Quiz Elements is simpler and integrates well with existing Webform setups but is limited to radio button questions.
Choose the best solution that matches your project requirements.
What’s Webform
The Webform module enables you to build customizable forms designed to collect user submissions.
This versatile tool allows you to create anything from simple contact forms to complex multi-page surveys, with the ability to send collected data directly to SalesForce or other CRM systems, while featuring capabilities like form drafts, previews, scheduling, and sharing functionality.
The module can be enhanced with various add-ons that provide SPAM protection, CRM integration, and other specialized features.





2 comments
Bahaa
Is the way to use this Module as a Drupal or Gutenberg block instead of a single page ?
Ivan Zugec
Hi,
I haven’t tried to embed one of the quizzes as a block. You will need to research this further.
At the end of the day, you can write some custom code to expose the quiz as a block.
Cheers,
Ivan