Quiz
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.
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.
Install
composer require 'drupal/quiz:^7.0'
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
Dependencies
Related Projects
Quiz integrates with Rules for feedback conditions. QuizFeedbackType entities can have Rules components that determine when specific feedback is displayed based on quiz result conditions.
Quiz provides Views integration for result management. Includes pre-built views for Quiz Results, Question Bank, Unevaluated Results, and User Results.
Question bank and result views include VBO integration for bulk actions like adding questions to quizzes or deleting results.
Quiz uses Paragraphs for flexible content structures including multichoice alternatives, matching pairs, result feedback, and categorized term pools.
Quiz can integrate with H5P module for additional interactive content types (20+ content types available through H5P).
Quiz can be used as a component within Course module to build learning paths with multiple quizzes.
Quiz results can trigger certificate generation through the Certificate module upon passing.
Optional integration with jQuery Countdown library for displaying a visual timer during timed quizzes.
Quiz results and answers can be exported using Views Data Export module for reporting and analysis.
Admin Pages
| Title | Path | Description |
|---|---|---|
| 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
| Permission | Description |
|---|---|
|
Control the various settings and behavior of quiz including global settings and entity type management. |
|
Allow users to manage quiz result types and their fields. |
|
Can access (take) all available quizzes. Required permission for quiz takers. |
|
Quiz authors can view results for their own quizzes. |
|
Quiz authors can delete results for their own quizzes. |
|
Quiz authors can score and update results for their own quizzes (for manually graded questions). |
|
Allow the user to see the correct answer when viewing questions outside a quiz context. |
|
Questions automatically get a title based on the question text. This allows titles to be set manually. |
|
WARNING: Users with this permission can edit quizzes and questions without creating revisions. This may cause issues with reporting. |
Hooks
| Hook | Description |
|---|---|
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
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
- 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