Quiz

A comprehensive assessment and quiz creation module that allows administrators to create interactive quizzes with multiple question types, graded scoring, and detailed feedback options.

quiz
3,472 sites
69
drupal.org

Install

Drupal 11, 10 v7.0.2
composer require 'drupal/quiz:^7.0'

Overview

The Quiz module provides a complete assessment engine for Drupal that allows users to administer quizzes as a sequence of questions and track the answers given. It enables the creation of questions with various answer types, organizes these questions into quizzes, and provides comprehensive result tracking and feedback mechanisms.

The module supports multiple question types through a plugin system, including multiple choice, true/false, short answer, long answer (essay), and matching questions. Each quiz can be extensively configured with options for randomization, time limits, attempt limits, and detailed feedback settings.

Quiz is designed for educational institutions, online training programs, employers, and anyone wanting to add interactive assessments to their Drupal site. It integrates with Views for result management, Rules for conditional feedback, and supports features like adaptive learning modes, certainty-based marking, and AJAX-based quiz taking.

Features

  • Create graded assessments with multiple question types (multiple choice, true/false, short answer, long answer, matching)
  • Extensive randomization options including random order, random question selection, and categorized random questions from taxonomy terms
  • Configurable feedback system with options for when feedback appears (after each question, at end of quiz) and what feedback is shown
  • Time-limited quizzes with optional jQuery countdown timer display
  • Multiple attempt support with configurable limits and result storage options (keep best, keep latest, keep all)
  • Question reuse across multiple quizzes with robust versioning system
  • Drag and drop ordering of questions with support for quiz pages/sections
  • Adaptive mode allowing repeat attempts until correct answer is provided
  • Build on last attempt mode to prepopulate answers from previous attempts
  • Pre-quiz questionnaires using Field API for collecting user information before quiz start
  • Question bank with Views Bulk Operations for efficient question management
  • Detailed result tracking with Views integration for reporting and export
  • Pass/fail grading with configurable passing percentage and summary messages
  • Resume incomplete quizzes from where user left off
  • Mark answers as doubtful feature for user self-assessment
  • Rules integration for conditional feedback based on quiz performance
  • AJAX quiz taking (experimental) for seamless question transitions
  • Devel generate support for creating test quiz data

Use Cases

Educational Assessment

Create graded quizzes for schools, universities, or online courses. Configure pass/fail thresholds, provide detailed feedback, and track student progress through multiple attempts.

Employee Training

Build compliance training with mandatory quizzes. Use time limits, attempt restrictions, and certificate integration to ensure employees complete required training.

Self-Learning Program

Enable adaptive mode with repeat-until-correct and build-on-last-attempt features. Users can practice until they master the material with immediate feedback.

Certification Exam

Create formal assessments with randomized questions from question pools, time limits, and strict attempt limits. Integrate with Certificate module for automated credential issuance.

Survey with Scoring

While not its primary purpose, Quiz can be used for scored surveys where responses are weighted and a final score determines outcomes.

Interactive Content

Embed quizzes within content as engagement tools. Use AJAX quiz mode for seamless integration and immediate feedback.

Tips

  • Always enable at least one question type module before creating quizzes
  • Use the Question Bank view with bulk operations for efficient question management across multiple quizzes
  • Create quiz pages using the Quiz Pages submodule to organize long quizzes into logical sections
  • Configure feedback types with Rules conditions for sophisticated conditional feedback based on score ranges
  • Use the 'Build on last attempt' feature for practice quizzes where users should improve over time
  • Enable revisioning when you need to make changes to quizzes that already have attempts while preserving result integrity
  • Set up Views Data Export for generating quiz reports and answer exports

Technical Details

Admin Pages 15
Quiz /admin/quiz

Main administration hub for the Quiz module providing access to all quiz-related configuration and management pages.

Quizzes /admin/quiz/quizzes

Overview page for managing quizzes. Provides links to quiz listing and global quiz settings.

Quiz List /admin/quiz/quizzes/list

View and manage all quizzes in the system. Allows administrators to view, edit, delete, and manage questions for each quiz.

Quiz Settings /admin/quiz/config/quiz

Global configuration settings for the Quiz module affecting all quizzes.

Questions /admin/quiz/questions

Overview page for managing quiz questions across all quizzes.

Question List /admin/quiz/questions/list

View and manage all quiz questions. Questions can be assigned to multiple quizzes.

Reports /admin/quiz/reports

Access quiz result reports and analytics.

Structure /admin/quiz/config/structure

Manage quiz entity types including quiz types, question types, result types, answer types, and feedback types.

Quiz types /admin/quiz/config/structure/quiz-type

Create and manage quiz types (bundles). Quiz types allow different configurations and fields for different use cases.

Question types /admin/quiz/config/structure/quiz-question-type

View and manage quiz question types. Question types are defined by enabled question type modules.

Result types /admin/quiz/config/structure/quiz-result-type

Create and manage quiz result types. Result types can have different fields for collecting additional data.

Answer types /admin/quiz/config/structure/quiz-answer-type

View and manage quiz answer types. Answer types are automatically created by question type modules.

Feedback types /admin/quiz/config/structure/quiz-feedback-type

Create and manage quiz feedback types with Rules-based conditions. Control when different types of feedback are displayed.

Manage questions /quiz/{quiz}/questions

Drag and drop interface for managing questions assigned to a specific quiz. Allows reordering, setting max scores, updating revisions, and organizing questions into pages.

Add quiz /quiz/add/{quiz_type}

Create a new quiz with comprehensive configuration options organized in vertical tabs.

Permissions 9
Administer quiz configuration

Control the various settings and behavior of quiz including global settings and entity type management.

Administer quiz result types

Allow users to manage quiz result types and their fields.

Take quiz

Can access (take) all available quizzes. Required permission for quiz takers.

View results for own quiz

Quiz authors can view results for their own quizzes.

Delete results for own quiz

Quiz authors can delete results for their own quizzes.

Update results for own quiz

Quiz authors can score and update results for their own quizzes (for manually graded questions).

View any quiz question correct response

Allow the user to see the correct answer when viewing questions outside a quiz context.

Edit question titles

Questions automatically get a title based on the question text. This allows titles to be set manually.

Override quiz revisioning

WARNING: Users with this permission can edit quizzes and questions without creating revisions. This may cause issues with reporting.

Hooks 4
hook_quiz_feedback_options

Expose custom feedback options to Quiz administrators for controlling when feedback is displayed.

hook_quiz_feedback_options_alter

Alter the available quiz feedback options. Can modify labels or remove options.

hook_quiz_feedback_labels_alter

Alter the labels displayed for feedback options to users. Allows for more learner-friendly terminology.

hook_quiz_access

Control access to quiz operations. Introduces the 'take' operation for quiz access control.

Troubleshooting 5
Quiz shows 'Not enough questions were found' error

Ensure you have added questions to the quiz and that the questions are published. For random quizzes, verify the question pool has enough questions to meet the random question count.

Timer not displaying for timed quizzes

Install the jQuery Countdown library to /libraries/jquery-countdown/ and enable the 'Display timer' option in Quiz settings.

Cannot edit quiz with existing attempts

Either delete all quiz results first, enable revisioning in global settings, or grant the 'override quiz revisioning' permission to edit without revision.

Questions not appearing after adding them

Check that at least one question type module is enabled. Verify the questions are published and properly assigned to the quiz revision.

Feedback not showing after quiz

Check the feedback settings on the quiz under 'Question feedback' tab. Ensure the appropriate feedback options are enabled for 'After the quiz' timing.

Security Notes 4
  • The 'override quiz revisioning' permission should be granted carefully as it allows editing quizzes with existing attempts which can affect result integrity
  • Quiz results contain user answers and scores which may be sensitive information - use appropriate view permissions
  • Anonymous users can only take quizzes with unlimited attempts due to session limitations
  • Ensure proper access controls on result views to prevent unauthorized access to user assessment data