=== PressPrimer Quiz – AI Quiz Maker, Exam Builder & LMS Assessment Plugin ===
Contributors: pressprimer
Tags: quiz, learndash, assessment, lms, elearning
Requires at least: 6.4
Tested up to: 6.9
Stable tag: 2.2.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Enterprise-grade quiz builder plugin with AI question generation, LMS integration, and beautiful themes. Free forever.

== Description ==

**PressPrimer Quiz** is a professional assessment plugin that bridges the gap between basic quiz plugins and expensive enterprise platforms. Create beautiful, engaging quizzes with AI-powered question generation, deep LMS integration, and the reporting features serious educators need—all without monthly fees or per-student pricing.

**This isn't a crippled trial.** The free version is genuinely useful forever with unlimited quizzes, unlimited questions, AI generation, LMS integration, and three professional themes. We earn upgrades by delivering specialized features, not by hobbling what you get for free.

https://www.youtube.com/watch?v=YHyooYXKLo0

= Why Choose PressPrimer Quiz? =

Most WordPress quiz plugins were built for BuzzFeed-style trivia and basic scoring, not serious assessment. Meanwhile, built-in LMS quiz tools are afterthoughts with limited reporting, basic features, and dated interfaces. Enterprise LMS platforms cost $10,000-$100,000 per year with per-user fees.

PressPrimer Quiz delivers enterprise-grade assessment and includes all of the critical features you normally expect in premium plugins at no cost:

* **AI-Powered Question Generation** – Use your own OpenAI API key to generate questions from text, PDFs, or Word documents. No credits to buy, no middleware fees, no limits.
* **Deep LMS Integration** – Native integration with popular WordPress LMS plugins, including LearnDash, Tutor LMS, LifterLMS, and LearnPress. Quizzes appear in lessons or topics, trigger completions, and respect enrollment—automatically.
* **Modern, Beautiful Design** – Three professional themes that rival SaaS products. Your quizzes won't look like forms from 2005.
* **Real Reporting** – Score distribution, category breakdowns, time analytics, confidence reporting, and attempt history. 
* **Built to Prevent Cheating** – Server-side answer validation means correct answers are never exposed in page source. You can also limit attempts and force delays between retries.
* **Server-Side Resume That Works Everywhere** – Every answer is instantly saved to the server. Students can pause on their phone and resume on their laptop without losing a single response.

= Free Features That Cost Money Elsewhere =

PressPrimer Quiz includes features in the free version that competitors charge for:

* **Unlimited quizzes and questions** – No artificial limits
* **AI question generation** – Bring your own OpenAI API key
* **LMS integrations** – LearnDash, Tutor LMS, LifterLMS & LearnPress
* **Question banks** – Organize and reuse questions across quizzes
* **Dynamic quiz generation** – Pull random questions based on category, difficulty, and question bank
* **Server-side save and resume** – Students can pause and continue later from any device
* **Guest support** – Optional email capture for non-registered users
* **Quiz access controls** – Require login, allow guests, or let the quiz settings decide
* **Score-banded feedback** – Different messages based on performance
* **Per-question and per-answer feedback** – Explain correct and incorrect answers
* **Confidence ratings** – Optional checkbox for students to indicate certainty
* **Three professional themes** – Default, Modern, and Minimal
* **Question pool** – Limit the number of questions shown per attempt so each student gets a random subset from the full list
* **Customizable Appearance** – Adjust fonts, colors, spacing, and other visual styles. Includes Condensed Mode for streamlined quizzes with reduced vertical spacing.
* **Uncanny Automator integration** – Triggers for quiz completion, pass, and fail, with a comprehensive set of tokens for use in automations

= Perfect For =

* **Course creators** using LearnDash, TutorLMS, LearnPress, or LifterLMS who need better quizzes than built-in tools
* **Corporate trainers** running compliance assessments at scale
* **University departments** with thousands of students needing detailed analytics
* **Test prep programs** requiring support for question pools with thousands of items
* **Testing providers** who need enterprise reliability without enterprise pricing
* **Course entrepreneurs** selling premium educational content

= Focused on What Matters for Learning =

PressPrimer Quiz concentrates on multiple choice, multiple answer, and true/false question types to deliver the best possible experience for learning and performance assessment. By focusing on these core formats, we deliver enterprise-quality features, including massive question banks, anti-cheat protection, detailed analytics, and bulletproof reliability, rather than spreading thin across dozens of mediocre options.

= Built-in Integrations =

PressPrimer Quiz automatically detects and integrates with popular WordPress LMS plugins:

**LearnDash:** Attach quizzes to courses, lessons or topics. Passing a quiz can automatically mark the lesson or topic complete. Works with enrolled students and Group Leader roles.

**Tutor LMS:** Attach quizzes to lessons via the course builder. Passing a quiz can auto-complete the lesson and course. Works with public courses, enrolled students, and instructor roles.

**LifterLMS:** Attach quizzes to lessons via meta box. Passing a quiz can auto-complete the lesson and course. Works with open/free courses, enrolled students, and instructor roles.

**LearnPress:** Attach quizzes to lessons via the lesson settings panel. Link passing a quiz to lesson and course completion. Works with open courses, enrolled students, and instructor roles.

**Uncanny Automator:** Three triggers available: User completes a quiz, user passes a quiz, user fails a quiz. 

All integrations are bundled in the free version.

= Premium Features =

Unlock additional premium features at [pressprimer.com](https://pressprimer.com/):

* **Groups & Assignments** – Organize students into groups, assign quizzes with due dates, and track completion progress
* **Import/Export** – Move questions between sites or migrate from other quiz plugins with CSV, JSON, and XML support
* **Pre/Post Test Analysis** – Link quizzes as pre/post pairs and measure learning gain with score and category comparison charts
* **Quiz Detail Reports** – Per-quiz analytics dashboard with score distribution, category performance, question difficulty analysis, and score trends over time
* **Group Performance Reports** – Compare groups side by side, drill into individual member results, and track weekly score trends
* **Question Quality Analytics** – Identify problem questions with difficulty indexes, discrimination analysis, and distractor effectiveness reports
* **LearnDash Quiz Import** – Migrate entire LearnDash quizzes with questions into PressPrimer Quiz individually or in batches
* **Quiz Proctoring** – Monitor tab switches and fullscreen exits during quiz attempts with configurable flag thresholds, incident reports, per-quiz overrides, and desktop-only enforcement
* **xAPI/LRS Integration** – Send detailed learning data to your Learning Record Store for compliance and analytics
* **White-Label Branding** – Remove all PressPrimer branding and customize with your own logos, colors, and plugin name
* **Audit Logging** – Immutable log of every quiz, question, settings, and attempt change for compliance and accountability
* **Question Recovery & Version History** – Restore deleted questions and track every edit with one-click rollback to previous versions
* **AI Distractor Generation** – Generate plausible wrong answers for multiple choice questions using OpenAI, with individual review and bulk generation across entire question banks
* **Assignment Reminder Emails** – Automated reminder emails for students approaching assignment deadlines, with configurable timing windows and customizable templates
* **Branching Logic** – Create rules that skip or jump to questions based on student answers, with path-through-quiz visualization in reports
* **Curve Grading** – Apply grading curves to quiz scores with multiple methods
* **Spaced Repetition** – Schedule review sessions using the SM-2 algorithm with a student dashboard, email reminders, and educator tracking

= Scale-Ready Architecture =

Built for serious deployment:

* Custom database tables handle 10,000+ questions and 100,000+ attempts
* Object caching support for high-traffic sites
* WCAG 2.1 AA accessibility compliance
* Full internationalization with RTL support

= Documentation & Support =

* [Knowledge Base](https://pressprimer.com/knowledge-base/)

= Source Code & Development =

The full uncompressed source code for all JavaScript and CSS files is available in our public GitHub repository:

* [GitHub Repository](https://github.com/PressPrimer/pressprimer-quiz)

The `/src` directory contains all unminified source files. The plugin uses webpack for building production assets. To rebuild from source:

1. Clone the repository
2. Run `npm install` to install dependencies
3. Run `npm run build` to compile assets

== Installation ==

= Automatic Installation =

1. Go to **Plugins → Add New** in your WordPress admin
2. Search for "PressPrimer Quiz"
3. Click **Install Now** and then **Activate**
4. Navigate to **PressPrimer Quiz** in your admin menu to get started

= After Activation =

1. Go to **PressPrimer Quiz → Settings** to configure defaults
2. (Optional) Add your OpenAI API key for AI question generation
3. Create your first question bank under **Question Banks**
4. Build a quiz under **Quizzes → Add New**
5. Embed using Gutenberg blocks, shortcodes, or LMS integration

= LMS Integration =

If you have LearnDash, Tutor LMS, LifterLMS, or LearnPress installed, integration features enable automatically. No configuration required—just edit a lesson or topic and you'll see the quiz attachment options.

== Frequently Asked Questions ==

= Is this really free forever, or is it a limited trial? =

It's really free forever and not locked down. PressPrimer Quiz includes unlimited quizzes, unlimited questions, AI generation (with your own API key), LMS integrations, confidence ratings, per-question feedback, and three professional themes in the free version. We believe in earning upgrades by offering genuinely valuable premium features, not by crippling the free experience.

= How does AI question generation work? =

You provide your own OpenAI API key in the plugin settings. When generating questions, the plugin calls OpenAI directly—no middleware, no credits to purchase, no per-question fees. You pay OpenAI directly at their standard API rates (typically pennies per quiz). Generate from pasted text or uploaded PDF/Word documents. Review and edit every question before adding items to question banks.

= How does the server-side resume feature work? =

Every time a student selects an answer, it's immediately saved to your WordPress database. If users close their browser, switch devices, or lose internet connection, their progress is preserved. When they return—even from a different device—they pick up exactly where they left off. This works for logged-in users automatically; guest users maintain progress via session tokens.

= Does it work without an LMS plugin? =

Absolutely. PressPrimer Quiz works as a standalone quiz plugin. Use Gutenberg blocks or shortcodes to embed quizzes in any page or post. The LMS integrations are a bonus that enable automatically when an LMS is detected—they don't restrict standalone use.

= Will this conflict with my LMS's built-in quizzes? =

No. PressPrimer Quiz operates independently from native LMS quiz features. You can use both simultaneously—our quizzes appear via meta boxes and don't modify or interfere with built-in quiz functionality.

== External Services ==

This plugin connects to external third-party services. Use of these services is optional and requires explicit user configuration.

= OpenAI API =

This plugin offers optional AI-powered question generation using the OpenAI API. This feature is **disabled by default** and only activates when an administrator or authorized user enters their own OpenAI API key in the plugin settings.

**What data is sent:**
* Text content pasted by the user for question generation
* Content extracted from PDF or Word documents uploaded by the user
* Configuration parameters (number of questions, difficulty level, question types)

**When data is sent:**
* Only when a user explicitly clicks "Generate Questions" in the AI generation interface
* Data is never sent automatically or in the background

**What data is NOT sent:**
* Student quiz answers or attempt data
* User personal information
* Site configuration or other plugin data

**Service provider:** OpenAI, L.L.C.
* [Terms of Use](https://openai.com/policies/terms-of-use/)
* [Privacy Policy](https://openai.com/policies/privacy-policy/)
* [API Data Usage Policy](https://openai.com/policies/api-data-usage-policy/)

**Note:** You are responsible for your own use of the OpenAI API and must agree to OpenAI's terms when obtaining an API key. API usage costs are billed directly by OpenAI to the API key holder.

== Screenshots ==

1. PressPrimer Dashboard with key stats and quick actions
2. Question editor with contextual help
3. AI question generation with document upload
4. Quiz editor with multiple quiz types
5. Admin reporting with analytics

== Changelog ==

= 2.2.2 =
* Fixed: Pasting formatted content from Word, Google Docs, or other rich-text sources could break the answer layout by separating the radio button from its text. Links inside answers now always open in a new tab so students do not lose their progress.
* Fixed: Drag-and-drop reordering of rules in the Rules tab of a dynamic quiz now saves the new order
* Fixed: The close (X) button on admin modal dialogs (such as the Add Questions modal) now responds to clicks
* Fixed: Validating an OpenAI API key that has been disabled now shows a clear explanation instead of a generic error message
* Fixed: Search filters in the Add Questions modal are now cleared when the modal is reopened, so previous searches do not carry over
* Note: Each answer option is now wrapped in a `<div>` element instead of a `<label>` element to support rich content. If you have added custom CSS targeting `label.ppq-answer-option`, change the selector to `.ppq-answer-option` so it continues to apply.

= 2.2.1 =
* Fixed: Quiz submission failing with "Database error: Failed to save record" on sites without the School addon

= 2.2.0 =
* Added: Question Pool support to limit the number of questions shown per quiz attempt
* Added: Show points per question during the quiz and on the results page, with a new "Show Points Per Question" toggle in quiz settings
* Added: Lazy-load pagination for previous attempts on the quiz landing page; shows the first 5 attempts with a "Show more" button
* Added: Redesigned Status tab with two-column layout and a one-click copy button for support requests
* Fixed: Tutorial mode answer locks now persist across page reloads instead of resetting when navigating away
* Fixed: Source Bank dropdown in dynamic quiz rules now shows the bank name instead of the numeric ID
* Fixed: Category and tag dropdowns in dynamic quiz rules now show names instead of IDs
* Fixed: Quiz now appears on LearnPress preview lessons after course completion
* Fixed: Status tab attempt count now matches the Reports page total
* Fixed: Quiz and bank deletion now uses a modal confirmation dialog instead of browser confirm
* Fixed: Quiz preview page cleaned up with PHP 8.1 deprecation fix
* Fixed: Diagnostics page now shows the actual PHP memory limit instead of the WordPress constant
* Fixed: Correct and incorrect answer icons now display properly in the attempt detail modal
* Fixed: Report dates no longer show with a timezone offset in non-UTC timezones
* Fixed: Action buttons on quiz and bank pages now have distinct visual styles and correct sizing
* Fixed: Duplicate radio buttons no longer appear in the WordPress admin when Ant Design is loaded
* Fixed: Primary and retake button text now maintains readable contrast on hover

= 2.1.0 =
* Added: Display option controls — show or hide individual quiz elements (description, question count, score, pass/fail status, time spent, category breakdown, retake button, and more) via shortcode attributes or block inspector toggles
* Added: Customizable spacing — adjust line height, answer option spacing, question spacing, and container max width from Settings > Appearance, with separate values for Standard and Condensed modes
* Added: Pre/post test linking infrastructure for the Educator addon
* Added: Per-quiz proctoring override settings for the Enterprise addon
* Added: Tutor LMS instructors can now create and manage their own quizzes
* Added: Tutor LMS quiz now displays on public courses with no enrollment requirement
* Added: Tutor LMS lesson auto-completes after passing a required quiz, and course auto-completes when all lessons are done
* Fixed: Tutor LMS quiz no longer disappears after a student completes a course
* Added: LifterLMS instructors can now create and manage their own quizzes
* Added: LifterLMS quiz now displays on open/free courses with no enrollment requirement
* Added: LifterLMS lesson Complete button reappears correctly after passing a required quiz
* Fixed: LifterLMS quiz no longer disappears after a student completes a course or for course instructors
* Added: LearnPress instructors can now create and manage their own quizzes
* Added: LearnPress quiz now displays on open courses with no enrollment requirement
* Added: LearnPress lesson auto-completes after passing a required quiz, and course auto-completes when all lessons are done
* Fixed: LearnPress quiz no longer disappears after a student completes a course or for course instructors
* Fixed: LearnPress Complete button reappears correctly after passing a required quiz
* Added: LearnDash Group Leaders can now create and manage their own quizzes
* Fixed: LearnDash Mark Complete button reappears correctly after passing a required quiz
* Fixed: Back button no longer causes an infinite confirm dialog loop during a quiz
* Fixed: Display density setting now loads correctly when editing a quiz
* Fixed: Clearing the API key now works on servers that block HTTP DELETE requests
* Fixed: Dashboard activity chart and Reports overview cards now update immediately after quiz attempts instead of serving stale cached data

= 2.0.0 =
* Added: LearnPress LMS integration with lesson embedding and completion triggers
* Added: Condensed Mode for streamlined quizzes with reduced vertical spacing
* Added: Quiz access controls: require login, allow guests, or use global defaults
* Added: Premium addon support with extensibility hooks for Groups, Assignments, Import/Export, Question Analytics, xAPI, White-Label, and Audit Logging
* Fixed: Settings page now respects tab query parameter in URL
* Fixed: Global access mode setting now uses correct option name
* Fixed: Bank visibility description clarified for shared banks
* Fixed: Improved error messaging for AI generation timeouts (502/504 errors)
* Fixed: Reports page loading when addon tabs are active
* Improved: WordPress 6.7+ compatibility for translation loading

= 1.0.0 =
* Initial release
* Three question types: Multiple Choice, Multiple Answer, True/False
* Unlimited questions and question banks
* Visual quiz builder with fixed and dynamic modes
* AI question generation via OpenAI API
* Three professional themes: Default, Modern, Minimal
* LearnDash integration with lesson/topic embedding
* TutorLMS integration with course builder support
* LifterLMS integration with completion triggers
* Uncanny Automator integration with three triggers
* Guest support with optional email capture
* Server-side save and resume functionality
* Score-banded feedback system
* Per-question and per-answer feedback
* Confidence ratings
* Admin reporting dashboard
* Gutenberg blocks and shortcodes
* WCAG 2.1 AA accessibility compliance
* Full internationalization support

== Upgrade Notice ==

= 2.2.2 =
Fixes a quiz layout issue with formatted answer text, plus four smaller admin bug fixes.

= 2.2.1 =
Fix: Resolves quiz submission failure introduced in 2.2.0. All users should update immediately.

= 2.2.0 =
New: Question pool for random subsets, points per question display, and lazy-load attempt pagination. Premium: AI distractor generation, assignment reminders, branching logic, curve grading, and spaced repetition.

= 2.1.0 =
New: Display option controls, customizable appearance spacing, LearnDash, Tutor LMS, LifterLMS, and LearnPress improvements, and support for new premium addon features.

= 2.0.0 =
New: LearnPress integration, Condensed Mode, quiz access controls, and premium addon support.

= 1.0.0 =
Initial release of PressPrimer Quiz. Enterprise-grade quizzes with AI generation and LMS integration—free forever.