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
Install
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
/admin/quiz
Main administration hub for the Quiz module providing access to all quiz-related configuration and management pages.
/admin/quiz/quizzes
Overview page for managing quizzes. Provides links to quiz listing and global quiz settings.
/admin/quiz/quizzes/list
View and manage all quizzes in the system. Allows administrators to view, edit, delete, and manage questions for each quiz.
/admin/quiz/config/quiz
Global configuration settings for the Quiz module affecting all quizzes.
/admin/quiz/questions
Overview page for managing quiz questions across all quizzes.
/admin/quiz/questions/list
View and manage all quiz questions. Questions can be assigned to multiple quizzes.
/admin/quiz/reports
Access quiz result reports and analytics.
/admin/quiz/config/structure
Manage quiz entity types including quiz types, question types, result types, answer types, and feedback types.
/admin/quiz/config/structure/quiz-type
Create and manage quiz types (bundles). Quiz types allow different configurations and fields for different use cases.
/admin/quiz/config/structure/quiz-question-type
View and manage quiz question types. Question types are defined by enabled question type modules.
/admin/quiz/config/structure/quiz-result-type
Create and manage quiz result types. Result types can have different fields for collecting additional data.
/admin/quiz/config/structure/quiz-answer-type
View and manage quiz answer types. Answer types are automatically created by question type modules.
/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.
/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.
/quiz/add/{quiz_type}
Create a new quiz with comprehensive configuration options organized in vertical tabs.
Permissions 9
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
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.
Install the jQuery Countdown library to /libraries/jquery-countdown/ and enable the 'Display timer' option in Quiz settings.
Either delete all quiz results first, enable revisioning in global settings, or grant the 'override quiz revisioning' permission to edit without revision.
Check that at least one question type module is enabled. Verify the questions are published and properly assigned to the quiz revision.
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