Project Description

Overview

Custom Exam Builder is a WordPress/LearnDash plugin that extends an existing LMS so learners can create their own practice exams from the questions they have access to. It’s aimed at training and certification sites that want a “build your own exam” experience without manual quiz setup or long-term storage of one-off quizzes.

What Was Built

Front-End Exam Builder UI

A modal interface (triggered from WooCommerce My Account or via a shortcode) where users can configure their own practice exam.

Users can:

  • Choose exam type:Tutor (explanations after each question or at the end) and/orTimed (configurable time limit in minutes)

  • Filter by question pool:Unanswered, Answered Incorrectly, Answered Correctly, or All

  • Filter by question categories at three levels(for example: top, middle, bottom), with counts updating dynamically as filters change

  • Set the number of questions(capped based on requirements, e.g., 100)

Access Control

Visibility and access to the exam builder are controlled through:

  • LearnDash group membership (e.g., using ACF or meta fields such as “enable custom exam builder” on the group)

  • WooCommerce product purchase using the same flag on products

Users only see questions from the courses they are enrolled in, and internal or CEB-generated courses are excluded from the question pool.

Quiz Lifecycle

When the user clicks Create Examx the plugin:

  1. Creates a temporary LearnDash quiz and course structure

  2. Pulls questions from the user’s pool while respecting selected pool filters and category filters

  3. Enrolls the user in the generated course and redirects them to the exam

After completion:

  • The quiz is marked for deletion

  • The temporary course, lesson, quiz, and related data are automatically cleaned up

  • Global question statistics are preserved, ensuring the “Answered Correctly / Incorrectly” counts remain accurate for the main question bank.

Performance and Maintenance

  • Question pools and statistics are cached per user, with cache invalidation triggered by access changes, order completion, or group updates

  • An optional scheduled cleanup systemremoves stale custom exam courses based on age (TTL-based), preventing abandoned exams from accumulating

  • The builder UI is dependency-free, avoiding external JavaScript libraries and using lightweight native interactions and tooltips

Technical Notes

  • Integrates withLearnDash(courses, lessons, topics, quizzes, ProQuiz, and groups)

  • Optional integrations with WooCommerce and ACF

  • Uses WordPress transientsfor caching

  • Uses WP-Cronfor scheduled cleanup tasks

  • Follows WordPress coding standardsand avoids logging in production environments

Results & Value Added

For learners

  • Targeted practice exams filtered by difficulty, category, and performance

  • Ability to generate practice exams instantly without admin intervention

For admins

  • No need to manually create or maintain one-off practice quizzes

  • Access control managed through existing products and LearnDash groups

For the platform

  • A scalable “build your own exam” system

  • Automatic cleanup with minimal ongoing maintenance