TutorLab
Knowledge Base
Complete guide to the next-generation WordPress LMS plugin. Covers every module: from course hierarchy to the AI Suite with RAG, from the drag-and-drop Builder to the gamification engine with XP and badges.
Quick Start in 5 Steps
Get up and running with TutorLab. Follow these five steps to have your online course live and active.
- Activate the License
Go to Tutor Lab → Settings → License, enter the key received by email and click "Activate". The system verifies the license online and enables the modules included in your plan.
- Create the course structure
Go to Class Management, create a Course (the main container) and then one or more Classes (time-based editions). Assign exercises, lessons, and documents to the class.
- Add students
Go to System → Import Students for bulk CSV import, or approve registrations from the Approvals page. Assign each student to Course → Class → (optional Group).
- Build exercises with the Builder
Go to Content → Exercise Builder. Enter a title and icon, drag blocks from the palette to the canvas, configure each one, and click "Publish".
- Monitor progress
From the Teacher Dashboard and the Progress Matrix, view each student's status for every exercise in real time.
Requirements & License
WordPress Requirements
- WordPress 6.0+
- PHP 8.0+
- MySQL 5.7+ / MariaDB 10.3+
- ACF PRO 6.0+ (required)
- TCPDF (bundled in /lib/tcpdf/)
AI Suite Requirements
- Valid OpenAI API key
- AI addon active in your license
- PHP cURL enabled
- Active HTTPS connection
Available Addons
- ai_coach — Student AI Coach
- gamification_advanced — Advanced XP & badges
- pdf_export — Exercise PDF export
- email_automation — Email templates
- advanced_reports — Advanced analytics
- multi_team — Multiple teams
- sso — Single Sign-On
TutorLab AI Suite
A vertical, context-aware AI system that enhances learning without ever "inventing" information. Built on RAG (Retrieval-Augmented Generation), it only answers based on course content.
ai_coach addon is included in your license and the OpenAI API key is configured under AI → AI Configuration.RAG Engine — Zero Hallucinations
Unlike generic chatbots, TutorLab uses the RAG paradigm: it first retrieves relevant chunks from the Knowledge Base, then injects them into the prompt as context. If the answer is not in the uploaded documents, the AI says so explicitly and suggests contacting the human instructor.
Adaptive Coaching
The tone and complexity of responses adapt automatically to the student's profile (Novice → encouraging, Expert → challenging, Struggling → supportive).
Credits System
Every AI call consumes credits. The instructor assigns credits per user or class. Includes subscription plans and one-shot packages via PayPal and Stripe.
AI Analytics
Dashboard with: total API calls, tokens consumed, estimated costs, usage by student, by course, and by operation type. CSV export available.
AI Coach (Student Frontend)
Chat widget embedded in the frontend. Students can ask questions about the course; the AI responds based exclusively on the instructor's Knowledge Base.
[tutor_lab_ai_coach]
[tutorlab_ai_coach course="Course Name" module="Module Name" show_history="yes"]Features
- Contextual answers: course topics only
- Chat history: persistent across sessions
- Instant feedback: Helpful / Not Helpful rating
- Smart fallback: if no answer found, redirects to instructor
- Rate limiting: configurable abuse prevention
AJAX Actions
tutor_lab_ai_coach_send— send messagetutor_lab_ai_coach_history— retrieve historytutor_lab_ai_coach_clear— clear historytutor_lab_ai_coach_ask— direct query
Adaptive Coaching by Profile
| Student Profile | AI Tone | Example response to "What is ROAS?" |
|---|---|---|
| Novice Few XP, early logins | Encouraging | "Great question! ROAS stands for Return On Ad Spend. If you spend €1 and earn €4, your ROAS is 4. Keep it up!" |
| Expert Master level | Challenging | "ROAS = Revenue / Ad Spend. Note: a high ROAS doesn't mean profit if margins are thin. Have you factored in CAC impact?" |
| Struggling Many recent errors | Supportive | "I understand the confusion. Let's take a step back with a concrete example. Don't worry, we'll get through this together." |
RAG Engine & Knowledge Base
The semantic search engine that powers AI Coach responses. Managed from AI → Knowledge Base in the backend.
1. KB Upload
Upload texts, FAQs, lesson transcripts, PDF-converted text. Each item has: title, content, type, associated course/module.
2. Chunking
The TutorLab_KB_Chunker class splits long texts into semantic chunks with configurable overlap. Optimized for embeddings.
3. Vectorization
Chunks are transformed into numeric vectors via the OpenAI Embeddings API. Enables search by "concept" rather than just keyword matching.
Knowledge Base AJAX Actions
| AJAX Action | Description |
|---|---|
tutor_lab_kb_delete | Delete a KB item |
tutor_lab_kb_search | Semantic search within the KB |
tutor_lab_kb_reindex | Recalculate embeddings for an item |
tutor_lab_kb_preview_chunks | Preview chunking of a text |
tutor_lab_kb_get_stats | KB statistics (count, coverage) |
tutor_lab_kb_bulk_action | Bulk operations (reindex, delete) |
tutor_lab_ai_batch_embed_kb | Batch embedding of the entire KB |
AI Feedback Generator (Instructor)
When grading an exercise, click "Generate AI Feedback". The system reads the student's response and generates a contextualized draft correction.
Payload sent to the AI
{
"role": "teacher",
"student_level": "beginner",
"exercise_context": "SWOT Analysis",
"student_answer": "...",
"ideal_solution": "...",
"tone": "formal"
}
The generated response is inserted as a draft in the "General Feedback" field — the instructor can edit it before publishing. AJAX action: tutor_lab_ai_enhance_feedback
AI Credits System
Credits Database
Tables: wp_tutor_lab_ai_credits (user balance) and wp_tutor_lab_ai_transactions (ledger). Every operation is tracked.
Subscription Plans
Monthly/annual plans with automatic credit top-ups (Starter, Professional, Enterprise). Automatic renewal via WP-Cron.
One-Shot Packages
One-time purchase of fixed-volume credit bundles. Configurable volume discounts. PayPal and Stripe integration.
Threshold Notifications
Automatic email when credits drop below the configured threshold. Dismissible dashboard warning via AJAX.
AI Payments
PayPal Integration
Managed by the TutorLab_PayPal_Handler class.
tutor_lab_paypal_create_ordertutor_lab_paypal_capture_order
Stripe Integration
Managed by the TutorLab_Stripe_Handler class. Secure Checkout Session.
tutor_lab_stripe_create_checkout
Backend Menu
The plugin menu is organized into 6 logical sections with visual headings. The AI section only appears if the addon is active.
| Section | Menu Item | Slug / Page |
|---|---|---|
| Root | Teacher Dashboard | tutor-lab-dashboard |
| Super Admin | tutor-lab-superadmin | |
| MANAGEMENT | Class Management | tutor-lab-class-management |
| Students List | tutor-lab-students-list | |
| Team & Staff | tutor-lab-team | |
| Teacher Permissions | tutor-lab-teacher-permissions | |
| CONTENT | Exercises | edit.php?post_type=esercizio |
| Exercise Builder | tutor-lab-builder | |
| Student Answers | edit.php?post_type=risposta_studente | |
| Lessons | edit.php?post_type=lezione | |
| Documents | edit.php?post_type=documento | |
| Polls & Tests | edit.php?post_type=sondaggio | |
| COMMUNICATION | Messaging | tutor-lab-messages |
| Announcements | edit.php?post_type=annuncio | |
| Email Archive | edit.php?post_type=tutor_class_email | |
| GAMIFICATION | Badges | edit.php?post_type=badge |
| Rewards | edit.php?post_type=premio | |
| AI premium | AI Configuration | tutor-lab-ai-config |
| Knowledge Base | tutor-lab-kb | |
| AI Usage | tutor-lab-ai-usage | |
| AI Credits | tutor-lab-ai-credits | |
| SYSTEM | Reports & Statistics | tutor-lab-reports |
| Addon Store | tutor-lab-store | |
| Settings | tutor-lab-settings | |
| Import Students | tutor-lab-import | |
| Approvals | tutor-lab-approvals |
Teaching Hierarchy
A 4-level structure for managing complex organizations with multiple parallel courses, classes, and working groups.
1. Course
The main container (e.g., "Digital Marketing 2026"). Defines the global curriculum, materials, and general settings. Can have multiple Classes running concurrently.
2. Class
A time-based edition of the Course (e.g., "February 2026 Class"). Has specific start/end dates, assigned instructors, exercises, and its own configurations.
3. Working Group
A sub-group within a Class (e.g., "Team Alpha"). Useful for group projects, focused tutoring, and differentiated collaborative work.
4. Student
The end user. Can be enrolled in multiple Courses while maintaining separate XP progress and badges for each one.
classe taxonomy is applied to: esercizio, lezione, documento, annuncio, tutor_class_email, sondaggio. Every piece of content is always associated with one or more classes.Class Management
Time Lock
Set course start and end dates. Students cannot access materials outside this window. Term meta: _tutor_lab_start_date, _tutor_lab_end_date.
Per-Class Module Toggles
Enable/disable for each specific class: Gamification (_tutor_lab_gamification_enabled), Messaging (_tutor_lab_messaging_enabled), Review Banner (_tutor_lab_review_banner_enabled).
Approval Workflow
Students register as "Pending". Dedicated dashboard to approve enrollment and assign Course → Class → Group in a single operation.
Progress Matrix
Grid view: rows = students, columns = exercises, cell = status (completed, in-progress, not started, under review). Loads 50×50 in under 200ms.
Class Management AJAX Actions
| Action | Description |
|---|---|
tutor_lab_hierarchy_action | Hierarchy operations (create, edit, delete nodes) |
tutor_lab_add_students_to_class | Enroll students in a class |
tutor_lab_remove_student_from_class | Remove enrollment |
tutor_lab_update_class_exercises | Update exercises assigned to the class |
tutor_lab_refresh_matrix_data | Refresh the progress matrix |
tutor_lab_save_student_internal_note | Save internal admin note about a student |
Staff Roles & Permissions
| Role | Level | Responsibilities | Scope |
|---|---|---|---|
| Super Admin | Lv.100 | Full access, plugin management, global settings, billing and licenses. | Global |
| Coordinator | Lv.80 | Creates classes, manages enrollments, assigns Tutors, views global reports. | Per Course |
| Tutor | Lv.60 | Monitors progress, unlocks exercises, manages specific groups. | Per Class |
| Teacher | Lv.40 | Grades exercises, sends feedback, creates educational content. | Per Class |
| Student | Lv.10 | Accesses own materials, completes exercises, reads feedback. | Own Class |
Team & Staff
Manage collaborators from the Management → Team & Staff page. Each member has a specific role with scope limited to their area of responsibility.
multi_team addon in the license is required to manage multiple teams across several courses simultaneously. Without it, only basic WordPress user management is available.Exercise Builder
Visual drag & drop editor to create interactive exercises without writing code. Access from Content → Exercise Builder.
api_access addon in the license. The page is managed by /admin/builder-page.php. Saving is done via AJAX: tutor_lab_save_builder_exercise.Drag & Drop
Drag blocks from the left palette to the central canvas. Reorder by dragging the handle. Powered by Alpine.js.
Autosave
Automatic save every 30 seconds. Shortcut Ctrl+S / Cmd+S. Real-time status indicator (Saved / Unsaved changes / Saving).
Exercise Template
ACF field exercise_template: choose between default (free builder), ad-set-simulator, ad-creative-simulator, roas-simulator.
Exercise Data Structure (JSON)
{
"title": "SWOT Analysis",
"slug": "swot-analysis",
"fase": "analisi", // analisi | creazione | acquisizione | gestione | misurazione
"icon": "🎯",
"level": "apprendista", // apprendista | praticante | specialista | maestro
"visible": true,
"description": "...",
"sections": [
{
"id": "uuid-v4",
"type": "textarea", // see block list below
"title": "Strengths",
"icon": "💪",
"objective": "Describe the strengths",
"layout": "1-col", // 1-col | 2-col | 3-col | 2-1 | 1-2
"placeholder": "Enter here..."
}
]
}
Builder Blocks (19 types)
Text & Input
Media
Interactive
Callout
Layout
title|content separated by ---. Timeline uses the format date|title|description (one line per event).Ads Simulators
Specialized modules that replicate advertising platform interfaces (Meta Ads). Safe practice without a real budget. Template selected via ACF field exercise_template.
| Simulator | Template Slug | PHP File | Main Fields |
|---|---|---|---|
| Ad Set Simulator | ad-set-simulator | template-ad-set.php | Objective, Budget (type+amount), Dates, Locations, Age, Gender, Placements, Interests, KPIs, Key message, Audience justification |
| Ad Creative Simulator | ad-creative-simulator | template-ad-creative-simulator.php | Hook, Body (3 brains), Headline, CTA button, Creative (image upload) |
| ROAS Calculator | roas-simulator | template-roas-simulator.php | Instructions text (WYSIWYG), ROAS calculation & analysis (free textarea) |
risposta_studente CPT with specific meta keys (e.g., adset_objective, hook, risposta_roas_calculation). The data is included in the PDF export.Instructor Feedback System
Professional workflow for grading exercises. Supports per-section corrections, general feedback, draft mode, and publishing with automatic notification.
General Feedback
"Macro" comment on the entire submission. Stored in _draft_feedback_generale_docente. Email notification sent when published.
Per-Section Feedback
Score (0–5) and comment per section/field. Meta: _draft_feedback_punteggi_docente (array) and _draft_feedback_sezioni_docente.
Draft Mode
Save without notifying the student. Meta: _tutor_lab_has_feedback_draft and _draft_last_saved_timestamp. Publish when ready with tutor_lab_publish_feedback_ajax.
Feedback Meta Keys
| Meta Key | Type | Description |
|---|---|---|
_draft_feedback_generale_docente | String (HTML) | General feedback draft |
_draft_feedback_sezioni_docente | Serialized array | Per-section feedback text [key][feedback_text] |
_draft_feedback_punteggi_docente | Serialized array | Per-section scores (0-5) [key] => int |
_draft_average_score | Int | Calculated average of section scores |
_feedback_generale_docente | String (HTML) | Published feedback (visible to the student) |
_tutor_lab_has_feedback_draft | Flag ('1') | Indicates an active draft |
_draft_last_saved_timestamp | Int (Unix) | Timestamp of last draft save |
_feedback_field_sources | Serialized array | Edit source: manual | ai, with timestamp |
_internal_postit | String | Internal instructor note (not visible to the student) |
PDF Export
Generate professional PDFs of student responses. TCPDF library (DejaVuSans, full UTF-8). File: /includes/pdf-exporter.php. Requires the pdf_export addon.
Single Exercise PDF
Action URL: ?tutor_lab_action=export_student_answers_pdf&student_id=X&exercise_id=Y&_wpnonce=...
Includes: header, class badge, student data, all sections with answers, instructor feedback (optional).
All Exercises PDF (Aggregate)
Action: export_student_aggregate_pdf. Generates a multi-page PDF with cover, index, and all student answers.
Final Class Report PDF
Generated from Generate Final Report. Includes an evaluation table per student with scores (0-5) and general notes. Function: tutor_lab_generate_class_report_pdf().
Email System
Templates configurable from the backend without modifying PHP. Settings under System → Settings → Email. File: /includes/email-handler.php.
| Template | File | Recipient | Main Variables |
|---|---|---|---|
| New user welcome | new-user-welcome.php | Student | {{USER_NAME}}, {{SITE_NAME}}, {{LOGIN_URL}} |
| Generic admin notification | admin-notification.php | Admin | Customizable |
| Student started exercise | admin-notification-start.php | Admin | {{STUDENT_NAME}}, {{EXERCISE_TITLE}}, {{ADMIN_URL}} |
| Student completed exercise | admin-notification-completion.php | Admin | {{STUDENT_NAME}}, {{EXERCISE_TITLE}} |
| New content published | new-content-notification.php | Class students | {{USER_NAME}}, {{CONTENT_TITLE}}, {{CONTENT_URL}} |
| Feedback published (single) | student-feedback-notification.php | Student | {{USER_NAME}}, {{EXERCISE_TITLE}}, {{FEEDBACK_LINK}} |
| Bulk feedback | student-feedback-bulk-notification.php | Students | {{FEEDBACK_COUNT}}, {{EXERCISE_LIST}} |
| Exercise unlock request | unlock-request-admin.php | Admin | {{STUDENT_NAME}}, {{EXERCISE_TITLE}}, {{ADMIN_URL}} |
wp_tutor_lab_email_log table with timestamp, recipient, subject, and status (sent/failed). Configurable SMTP support. Action: tutor_lab_resend_notification_email for manual resend.Internal Messaging
Private messaging system between students and instructors/admins. CPT: messaggio_privato. Enabled per class: _tutor_lab_messaging_enabled.
Student Side
tutor_lab_get_conversations_studenttutor_lab_get_messages_for_thread_studenttutor_lab_send_reply_studenttutor_lab_compose_message_studenttutor_lab_get_valid_recipients_student
Admin Side
tutor_lab_get_conversations_admintutor_lab_get_messages_for_thread_admintutor_lab_send_reply_admintutor_lab_compose_message_admin
Announcements
CPT annuncio associated with the classe taxonomy. Publishing an announcement with the notification field active automatically schedules an email to all students in the class (via WP-Cron with a 10-second delay). Announcements appear in the student hub.
[tutor_lab_all_updates]
— Announcements and class updates feed for the logged-in student
Dashboard & Student Hub
[tutor_lab_hub]Central Hub (AJAX)
Student command center. Loads data asynchronously for optimal performance. Included widgets:
- Next Mission (exercise to complete)
- Current XP status and level
- Recently unlocked badges
- Instructor announcements
- Unread message counter
[tutor_lab_dashboard]Operations Lab
Exercise list filterable by status (To Start / In Progress / Completed). Visual progress bars and feedback status.
[tutor_lab_progress_hub]Progress Hub
Detailed statistics: completion percentages, XP earned per exercise, performance over time.
Gamification & XP System
Complete gamification engine. XP is automatically awarded in the background for every valuable action. Badges unlock when configurable triggers are met.
Progression Levels
XP Points Table
| Action | XP Awarded | PHP Constant | AJAX Action |
|---|---|---|---|
| First exercise save | +10 XP | TUTOR_LAB_XP_FOR_FIRST_SAVE | tutor_lab_save_exercise_data |
| Exercise completion | +50 XP | TUTOR_LAB_XP_FOR_COMPLETION | tutor_lab_save_exercise_data |
| Document view | +5 XP | TUTOR_LAB_XP_FOR_RESOURCE_VIEW | tutor_lab_mark_resource_as_viewed |
| Lesson view | +10 XP | TUTOR_LAB_XP_FOR_LESSON_VIEW | tutor_lab_mark_resource_as_viewed |
| Newsletter signup | +150 XP | TUTOR_LAB_XP_FOR_NEWSLETTER | tutor_lab_award_newsletter_xp |
| Poll completion | +150 XP | TUTOR_LAB_XP_FOR_POLL | tutor_lab_submit_poll |
| Perfect test score | +50 XP bonus | TUTOR_LAB_XP_FOR_TEST_PERFECT | tutor_lab_submit_poll |
Badges
CPT badge. Configurable triggers: first_login, exercises_completed_count. Meta: badge_trigger_type, badge_trigger_value_number. Unlocked badges are saved in _tutor_lab_unlocked_badges (array of post IDs).
Rewards
CPT premio. ACF fields: punti_xp_richiesti (XP cost), tipo_premio (file/link/coupon), specific content. AJAX: tutor_lab_redeem_reward.
Leaderboard
[tutor_lab_class_leaderboard]
— Class student ranking by XP, badges, and recent activity
Shows ranking with: student name, avatar, total XP, badge count, level, leaderboard position. Data from _tutor_lab_xp_points and _tutor_lab_unlocked_badges, filtered by the classe taxonomy.
Lock & Unlock System
Exercises are sequential: completing N unlocks N+1. Students can request early unlock with a justification.
Normal Flow
- Student completes Ex. 1
Meta
_tutor_lab_exercise_completed= true - Ex. 2 unlocks
Automatically available in the dashboard
- Admin grades Ex. 1
Feedback published, email notification sent
Early Unlock
- Student requests unlock
AJAX:
tutor_lab_request_unlock, meta_tutor_lab_unlock_requested= true - Admin receives email
Template:
unlock-request-admin.php - Admin approves from backend
AJAX:
tutor_lab_unlock_exercise_ajax
Polls & Tests
CPT sondaggio with template single-sondaggio.php. Supports single choice, multiple choice, and open-ended answers. Integrated with the XP system (+150 XP for completion, +50 XP bonus for a perfect score).
Poll AJAX Actions
tutor_lab_submit_poll— Submit poll answertutor_lab_get_poll_results— Retrieve results
CPT risposta_sondaggio
Each submission creates a risposta_sondaggio post with: author = student, meta with answers, score, and timestamp.
Shortcodes Reference
| Shortcode | File | Description |
|---|---|---|
[tutor_lab_ai_coach][tutorlab_ai_coach] | shortcodes/ai-coach.php | AI Coach Widget. Parameters: corso="", modulo="", show_history="yes". Requires AI addon. |
[tutor_lab_hub] | shortcodes/hub.php | Student central hub with missions, XP, badges, announcements. |
[tutor_lab_dashboard] | shortcodes/dashboard.php | Exercise dashboard with status filters. |
[tutor_lab_progress_hub] | shortcodes/progress-hub.php | Advanced student progress statistics. |
[tutor_lab_lessons] | shortcodes/lessons.php | Lesson list with completion status. |
[tutor_lab_documents] | shortcodes/documents.php | Study materials with download links. |
[tutor_lab_all_updates] | shortcodes/updates.php | Announcements and class updates feed. |
[tutor_lab_class_leaderboard] | shortcodes/leaderboard.php | Student ranking by XP and badges. |
[tutor_lab_profile] | shortcodes/profile.php | Student profile with badges, stats, password change. |
[tutor_lab_login_form] | shortcodes/login-form.php | Custom login form with forgot password. |
[tutor_lab_registration_form] | shortcodes/registration-form.php | Basic registration form. |
[tutor_lab_registration_choice] | shortcodes/registration-choice-form.php | Registration with role/class selection. |
[tutor_lab_registration_onboarding] | shortcodes/registration-full-onboarding.php | Complete multi-step onboarding wizard. |
Custom Post Types & Taxonomy
| CPT Slug | Label | Template | Notes |
|---|---|---|---|
lezione | Lesson | Default WP | Associated with classe taxonomy |
documento | Document | Default WP | Active media protection |
esercizio | Exercise | single-esercizio.php | ACF builder fields, ACF template exercise_template |
badge | Badge | Default WP | Configurable gamification triggers via ACF |
premio | Reward | Default WP | XP cost and content type via ACF |
risposta_studente | Student Answer | Not public | Author = student, instructor feedback meta |
annuncio | Announcement | Default WP | Automatic email notification on publish |
messaggio_privato | Private Message | Not public | Internal messaging |
tutor_class_email | Class Email | Default WP | Archive of emails sent to students |
sondaggio | Poll/Test | single-sondaggio.php | XP integration +150 on completion |
risposta_sondaggio | Poll Answer | Not public | Created automatically on submission |
Taxonomy
| Slug | Label | Applied To | Notes |
|---|---|---|---|
classe | Class | user, esercizio, lezione, documento, annuncio, tutor_class_email, sondaggio | Hierarchical, not public. Class meta: dates, status, module toggles. |
Complete AJAX Reference
Over 80 registered AJAX actions. Key ones for developers:
Exercises & Students
| Action | File | Description |
|---|---|---|
tutor_lab_save_exercise_data | ajax-exercise-handler.php | Save student exercise answers |
tutor_lab_heartbeat | ajax-exercise-handler.php | Keep-alive for exercise session |
tutor_lab_get_lock_status | ajax-exercise-handler.php | Check exercise lock status |
tutor_lab_request_unlock | ajax-exercise-handler.php | Student requests early unlock |
tutor_lab_save_builder_exercise | ajax-builder-handler.php | Save exercise JSON from admin builder |
tutor_lab_get_quick_correct_data | ajax-admin-handler.php | Retrieve data for quick grading |
tutor_lab_save_quick_correct_data | ajax-admin-handler.php | Save quick grading draft |
tutor_lab_publish_feedback_ajax | ajax-admin-handler.php | Publish feedback and notify student |
tutor_lab_unlock_exercise_ajax | ajax-admin-handler.php | Admin manually unlocks exercise |
Gamification
| Action | Description |
|---|---|
tutor_lab_mark_resource_as_viewed | XP for viewing lesson/document |
tutor_lab_award_newsletter_xp | XP for newsletter signup |
tutor_lab_redeem_reward | Redeem reward with XP |
tutor_lab_get_hub_gamification_data | XP/level/badge data for the hub |
tutor_lab_get_hub_missions_data | Next available missions |
tutor_lab_get_hub_announcement_data | Class announcements |
tutor_lab_get_hub_updates_data | Recent activity feed |
tutor_lab_get_hub_inbox_badge_data | Unread message counter |
Registration & Auth
| Action | Privilege | Description |
|---|---|---|
tutor_lab_rapid_register_wizard | nopriv | Quick wizard registration |
tutor_lab_full_register_wizard | nopriv | Full onboarding registration |
tutor_lab_activate_license | admin | License activation via server |
tutor_lab_send_recharge_request | admin | AI token recharge request |
Administration
| Action | Description |
|---|---|
tutor_lab_refresh_matrix_data | Refresh progress matrix |
tutor_lab_get_student_activity_log | Student activity log |
tutor_lab_save_report_data | Save final report data draft |
tutor_lab_upload_creative_image | Upload image for creative simulator |
tutor_lab_export_stats_csv | Export statistics as CSV |
tutor_lab_export_stats_json | Export statistics as JSON |
tutor_lab_import_ics_events | Import ICS calendar |
tutor_lab_save_class_email | Save class email |
tutor_lab_generate_feedback_json_template | Generate feedback JSON template |
tutor_lab_get_hub_aggregated_data | Aggregated hub data (admin ACTION) |
tutor_lab_submit_review | Student submits course review |
WordPress Hooks
Key Actions
| Hook | Priority | Use |
|---|---|---|
admin_post_tutor_lab_generate_report | default | Generate final class PDF report |
admin_post_tutor_lab_publish_feedback | default | Publish feedback from admin form |
admin_post_tutor_lab_publish_feedback_bulk | default | Publish feedback in bulk |
admin_post_tutor_lab_reset_exercise | default | Reset student answer |
admin_post_tutor_lab_unlock_exercise | default | Unlock exercise |
tutor_lab_send_content_notification_cron | 10 | Cron: send published content notification |
save_post_risposta_studente | 10, 20 | Save feedback draft, calculate XP |
Key Filters
| Filter | Use |
|---|---|
theme_page_templates | Registers custom templates: page-canvas.php, template-onboarding-fullscreen.php, simulators |
template_include | Loads custom CPT templates (priority 98, 99) |
body_class | Adds frontend classes (role, class, theme) |
admin_body_class | Admin classes for shell styling |
wp_authenticate_user | Blocks pending users at login |
acf/load_value/name=* | Fix for loading ACF array meta |
License System
File: /includes/core/license-manager.php. License server: https://promologica.it/wp-json/tl-license/v1
Main Functions
tutor_lab_is_license_valid()— booleantutor_lab_is_addon_active($addon)— booleantutor_lab_get_license_limit($key)— int|nulltutor_lab_is_limit_exceeded($key, $count)— boolean
Addon Slugs
ai/ai_coachgamificationemail/email_automationanalytics/advanced_reportsbuilder/api_accesspdf/pdf_exportbranding/custom_brandingmulti_teamvideo/video_lessonssso
Controllable Limits
max_studentsmax_teachersmax_coursesmax_exercisesmax_storage_mbmax_ai_calls_month
token-recharge-manager.php) automatically monitors AI token usage: warning at 80% (TUTOR_LAB_TOKEN_WARN_PCT) and critical at 95% (TUTOR_LAB_TOKEN_CRITICAL_PCT). AJAX: tutor_lab_send_recharge_request.Frequently Asked Questions
Can the AI Coach make up incorrect information?
How do I add students to the platform?
[tutor_lab_registration_choice] shortcode — registrations land in "pending" status and are approved from the Approvals page.Can I manage multiple courses simultaneously?
multi_team addon, you can manage multiple teams with different instructors per course.How does the Builder autosave work?
Ctrl+S / Cmd+S to save manually at any time.What happens if AI credits run out?
How do I modify an email template without PHP?
{{USER_NAME}}, {{EXERCISE_TITLE}}, etc.). You can preview and send test emails.Does the PDF report show the assigned grades?
_draft_feedback_punteggi_docente with fallback to _draft_average_score. Tables are never split across pages.How do I enable gamification for a single class?
_tutor_lab_gamification_enabled. You can enable/disable it from the Class Management page with a simple toggle, without modifying global settings.Best Practices
Teaching Progression
- Start with simple exercises, gradually increase complexity
- Use "Instructions" blocks to provide clear context before each exercise
- Alternate theory (lessons) and practice (exercises) regularly
- Keep exercises to 5-7 sections to avoid overwhelming students
Optimizing the AI
- Populate the KB with quality materials before activating the AI Coach
- Monitor consumption weekly to optimize costs
- Use different AI Profiles for formal vs. informal tones
- Periodically review AI feedback to ensure quality
Effective Gamification
- Create easy badges (initial motivation) and hard ones (challenge goals)
- Reward consistency (streaks) beyond just point-in-time results
- Keep the leaderboard visible but not intrusive
- Use rewards to incentivize specific behaviors
Security & Performance
- Always verify nonces in custom AJAX actions
- Use
tutor_lab_is_addon_active()for safe feature flags - Media protection rewrite blocks direct access to protected files
- The progress matrix is optimized with a single SQL query — do not run additional queries in loops
