Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/zeeshan-sshaikh/learndash-sequential-hints/archive/refs/heads/main.zipLearnDash Sequential Hints is a professional WordPress plugin that enhances LearnDash quizzes by introducing a tiered, strategic hint system. It encourages critical thinking by providing students with up to three sequential hints per question, all while maintaining assessment integrity through a global quiz-wide hint budget.
🚀 Key Features
1. Sequential Hint Reveal
Hints are revealed one by one. The next hint in the sequence only becomes available after the previous one has been viewed. This prevents "hint dumping" and encourages students to work through problems step-by-step.
2. Three-Tier Guidance
Administrators can configure up to three unique hints for every quiz question.
- Hint 1: The standard LearnDash hint.
- Hint 2 & 3: Additional layers of guidance added by this plugin.
3. Global Hint Budget
To prevent over-reliance on assistance, the plugin enforces a global budget of 5 hints per quiz attempt. Once a student uses 5 hints across any combination of questions, all remaining hint buttons are automatically disabled.
4. Real-time Progress Tracking
A persistent, live counter (e.g., "Hints used: 2/5") is displayed at the top of the quiz, keeping students informed of their remaining resources.
5. Session Persistence
Fully integrated with LearnDash's "Quiz Saving" feature. If a student leaves a quiz and returns later, their revealed hints and remaining budget are perfectly restored.
📋 Prerequisites
Before installing, ensure your environment meets the following requirements:
- WordPress: 6.0 or higher
- LearnDash LMS: 4.0 or higher (Active)
- PHP: 7.4 or higher
- Browser: Modern browsers with JavaScript enabled (Chrome, Firefox, Safari, Edge)
🛠️ Installation
📥 Standard Installation (Easy)
- Download the latest release
.zipfile from the Releases page. - In your WordPress Dashboard, go to Plugins > Add New.
- Click Upload Plugin at the top.
- Choose the downloaded
.zipfile and click Install Now. - Activate the plugin.
💻 Developer Installation (Git)
# Navigate to your WordPress plugins directory
cd wp-content/plugins/
# Clone the repository
git clone https://github.com/zeeshan-sshaikh/LearnDash-Sequential-Hints.git learndash-sequential-hints
# No build steps required. Activate via WordPress Dashboard or WP-CLI
wp plugin activate learndash-sequential-hints
📖 How It Works: Instructions
For Administrators: Setting Up Hints
- Navigate to LearnDash LMS > Questions.
- Edit an existing question or create a new one.
- Locate the "Hint" section (standard LearnDash field). This is your Hint 1.
- Scroll down to the "Additional Hints" meta box provided by this plugin.
- Enter your content for Hint 2 and Hint 3.
- Note: If you leave Hint 2 empty, Hint 3 will be ignored to maintain the sequence.
- Save the question.
For Students: Using Hints
- Start a quiz as usual.
- Look for the "Hints used: 0/5" counter at the top of the quiz interface.
- Click the "Show Hint" button on any question to see the first hint.
- If more hints are available, a new button will appear for that question.
- Once the counter reaches 5/5, all "Show Hint" buttons will disappear across the entire quiz.
🔍 Technical Architecture
This plugin follows WordPress and LearnDash best practices for performance and stability:
- Data Storage: Uses WordPress
post_metafor question hints anduser_metafor real-time tracking of quiz attempts. - AJAX Driven: Hint reveals are handled via secure AJAX calls (
wp_ajax_ldh_use_hint) to ensure a smooth user experience without page reloads. - Security: Rigorous input sanitization (
sanitize_textarea_field) and output escaping (wp_kses_post) are applied throughout. - Localization: Fully translation-ready with
.potfiles included in the/languagesdirectory.
Project Directory Structure
learndash-hints-plugin/
├── assets/ # CSS and JavaScript
│ ├── css/ # Frontend & Admin UI styling
│ └── js/ # Sequential logic & AJAX handlers
├── includes/ # Core PHP Logic
│ ├── class-plugin.php # Plugin bootstrap & dependency checks
│ ├── class-admin.php # Question editor meta boxes
│ └── class-frontend.php # AJAX endpoints & quiz rendering
├── languages/ # Translation files
├── specs/ # Detailed technical specifications
└── learndash-hints-plugin.php # Main entry point
🤝 Contributing
We welcome contributions! Whether it's reporting a bug, suggesting a feature, or submitting a pull request, please see our CONTRIBUTING.md for guidelines.
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your Changes (
git commit -m 'Add some AmazingFeature'). - Push to the Branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
📄 License
Distributed under the GPL-2.0+ License. See LICENSE for more information.
🌟 Support & Feedback
If you find this plugin useful, please consider:
- Giving the project a ⭐ on GitHub.
- Opening an Issue for any bugs or feature requests.
Maintained by Zeeshan Shaikh