TutorLab — Complete Knowledge Base
Official Documentation v2.1.0 Updated: Mar 2026

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.

19
Builder Blocks
13+
Shortcodes
80+
AJAX Actions
18
AI Classes
11
Post Types
XP+
Gamification

Quick Start in 5 Steps

Get up and running with TutorLab. Follow these five steps to have your online course live and active.

  1. 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.

  2. 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.

  3. 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).

  4. 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".

  5. 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.

Premium Module. The AI Suite is only active if the 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]
or: [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 message
  • tutor_lab_ai_coach_history — retrieve history
  • tutor_lab_ai_coach_clear — clear history
  • tutor_lab_ai_coach_ask — direct query

Adaptive Coaching by Profile

Student ProfileAI ToneExample 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 ActionDescription
tutor_lab_kb_deleteDelete a KB item
tutor_lab_kb_searchSemantic search within the KB
tutor_lab_kb_reindexRecalculate embeddings for an item
tutor_lab_kb_preview_chunksPreview chunking of a text
tutor_lab_kb_get_statsKB statistics (count, coverage)
tutor_lab_kb_bulk_actionBulk operations (reindex, delete)
tutor_lab_ai_batch_embed_kbBatch 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_order
  • tutor_lab_paypal_capture_order

Stripe Integration

Managed by the TutorLab_Stripe_Handler class. Secure Checkout Session.

  • tutor_lab_stripe_create_checkout

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.

The 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

ActionDescription
tutor_lab_hierarchy_actionHierarchy operations (create, edit, delete nodes)
tutor_lab_add_students_to_classEnroll students in a class
tutor_lab_remove_student_from_classRemove enrollment
tutor_lab_update_class_exercisesUpdate exercises assigned to the class
tutor_lab_refresh_matrix_dataRefresh the progress matrix
tutor_lab_save_student_internal_noteSave internal admin note about a student

Staff Roles & Permissions

RoleLevelResponsibilitiesScope
Super AdminLv.100Full access, plugin management, global settings, billing and licenses.Global
CoordinatorLv.80Creates classes, manages enrollments, assigns Tutors, views global reports.Per Course
TutorLv.60Monitors progress, unlocks exercises, manages specific groups.Per Class
TeacherLv.40Grades exercises, sends feedback, creates educational content.Per Class
StudentLv.10Accesses 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.

The 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.

Addon Required. The advanced Builder requires the 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

Textarea
Fields (Structured Fields)
Instructions
Quote
Code

Media

Image
Video Embed
File Upload

Interactive

Checklist
Accordion
Tabs NEW
List NEW
Timeline NEW
Table

Callout

Alert
Callout
Progress Bar

Layout

Row / Columns
Divider
Special blocks: File Upload saves files in a protected WordPress directory. Tabs uses the format 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.

SimulatorTemplate SlugPHP FileMain Fields
Ad Set Simulatorad-set-simulatortemplate-ad-set.phpObjective, Budget (type+amount), Dates, Locations, Age, Gender, Placements, Interests, KPIs, Key message, Audience justification
Ad Creative Simulatorad-creative-simulatortemplate-ad-creative-simulator.phpHook, Body (3 brains), Headline, CTA button, Creative (image upload)
ROAS Calculatorroas-simulatortemplate-roas-simulator.phpInstructions text (WYSIWYG), ROAS calculation & analysis (free textarea)
Student responses to simulators are saved in the 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 KeyTypeDescription
_draft_feedback_generale_docenteString (HTML)General feedback draft
_draft_feedback_sezioni_docenteSerialized arrayPer-section feedback text [key][feedback_text]
_draft_feedback_punteggi_docenteSerialized arrayPer-section scores (0-5) [key] => int
_draft_average_scoreIntCalculated average of section scores
_feedback_generale_docenteString (HTML)Published feedback (visible to the student)
_tutor_lab_has_feedback_draftFlag ('1')Indicates an active draft
_draft_last_saved_timestampInt (Unix)Timestamp of last draft save
_feedback_field_sourcesSerialized arrayEdit source: manual | ai, with timestamp
_internal_postitStringInternal 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.

TemplateFileRecipientMain Variables
New user welcomenew-user-welcome.phpStudent{{USER_NAME}}, {{SITE_NAME}}, {{LOGIN_URL}}
Generic admin notificationadmin-notification.phpAdminCustomizable
Student started exerciseadmin-notification-start.phpAdmin{{STUDENT_NAME}}, {{EXERCISE_TITLE}}, {{ADMIN_URL}}
Student completed exerciseadmin-notification-completion.phpAdmin{{STUDENT_NAME}}, {{EXERCISE_TITLE}}
New content publishednew-content-notification.phpClass students{{USER_NAME}}, {{CONTENT_TITLE}}, {{CONTENT_URL}}
Feedback published (single)student-feedback-notification.phpStudent{{USER_NAME}}, {{EXERCISE_TITLE}}, {{FEEDBACK_LINK}}
Bulk feedbackstudent-feedback-bulk-notification.phpStudents{{FEEDBACK_COUNT}}, {{EXERCISE_LIST}}
Exercise unlock requestunlock-request-admin.phpAdmin{{STUDENT_NAME}}, {{EXERCISE_TITLE}}, {{ADMIN_URL}}
All emails are logged in the 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_student
  • tutor_lab_get_messages_for_thread_student
  • tutor_lab_send_reply_student
  • tutor_lab_compose_message_student
  • tutor_lab_get_valid_recipients_student

Admin Side

  • tutor_lab_get_conversations_admin
  • tutor_lab_get_messages_for_thread_admin
  • tutor_lab_send_reply_admin
  • tutor_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

Novice
Apprentice
Specialist
Master

XP Points Table

ActionXP AwardedPHP ConstantAJAX Action
First exercise save+10 XPTUTOR_LAB_XP_FOR_FIRST_SAVEtutor_lab_save_exercise_data
Exercise completion+50 XPTUTOR_LAB_XP_FOR_COMPLETIONtutor_lab_save_exercise_data
Document view+5 XPTUTOR_LAB_XP_FOR_RESOURCE_VIEWtutor_lab_mark_resource_as_viewed
Lesson view+10 XPTUTOR_LAB_XP_FOR_LESSON_VIEWtutor_lab_mark_resource_as_viewed
Newsletter signup+150 XPTUTOR_LAB_XP_FOR_NEWSLETTERtutor_lab_award_newsletter_xp
Poll completion+150 XPTUTOR_LAB_XP_FOR_POLLtutor_lab_submit_poll
Perfect test score+50 XP bonusTUTOR_LAB_XP_FOR_TEST_PERFECTtutor_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

  1. Student completes Ex. 1

    Meta _tutor_lab_exercise_completed = true

  2. Ex. 2 unlocks

    Automatically available in the dashboard

  3. Admin grades Ex. 1

    Feedback published, email notification sent

Early Unlock

  1. Student requests unlock

    AJAX: tutor_lab_request_unlock, meta _tutor_lab_unlock_requested = true

  2. Admin receives email

    Template: unlock-request-admin.php

  3. 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 answer
  • tutor_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

ShortcodeFileDescription
[tutor_lab_ai_coach]
[tutorlab_ai_coach]
shortcodes/ai-coach.phpAI Coach Widget. Parameters: corso="", modulo="", show_history="yes". Requires AI addon.
[tutor_lab_hub]shortcodes/hub.phpStudent central hub with missions, XP, badges, announcements.
[tutor_lab_dashboard]shortcodes/dashboard.phpExercise dashboard with status filters.
[tutor_lab_progress_hub]shortcodes/progress-hub.phpAdvanced student progress statistics.
[tutor_lab_lessons]shortcodes/lessons.phpLesson list with completion status.
[tutor_lab_documents]shortcodes/documents.phpStudy materials with download links.
[tutor_lab_all_updates]shortcodes/updates.phpAnnouncements and class updates feed.
[tutor_lab_class_leaderboard]shortcodes/leaderboard.phpStudent ranking by XP and badges.
[tutor_lab_profile]shortcodes/profile.phpStudent profile with badges, stats, password change.
[tutor_lab_login_form]shortcodes/login-form.phpCustom login form with forgot password.
[tutor_lab_registration_form]shortcodes/registration-form.phpBasic registration form.
[tutor_lab_registration_choice]shortcodes/registration-choice-form.phpRegistration with role/class selection.
[tutor_lab_registration_onboarding]shortcodes/registration-full-onboarding.phpComplete multi-step onboarding wizard.

Custom Post Types & Taxonomy

CPT SlugLabelTemplateNotes
lezioneLessonDefault WPAssociated with classe taxonomy
documentoDocumentDefault WPActive media protection
esercizioExercisesingle-esercizio.phpACF builder fields, ACF template exercise_template
badgeBadgeDefault WPConfigurable gamification triggers via ACF
premioRewardDefault WPXP cost and content type via ACF
risposta_studenteStudent AnswerNot publicAuthor = student, instructor feedback meta
annuncioAnnouncementDefault WPAutomatic email notification on publish
messaggio_privatoPrivate MessageNot publicInternal messaging
tutor_class_emailClass EmailDefault WPArchive of emails sent to students
sondaggioPoll/Testsingle-sondaggio.phpXP integration +150 on completion
risposta_sondaggioPoll AnswerNot publicCreated automatically on submission

Taxonomy

SlugLabelApplied ToNotes
classeClassuser, esercizio, lezione, documento, annuncio, tutor_class_email, sondaggioHierarchical, not public. Class meta: dates, status, module toggles.

Complete AJAX Reference

Over 80 registered AJAX actions. Key ones for developers:

Exercises & Students

ActionFileDescription
tutor_lab_save_exercise_dataajax-exercise-handler.phpSave student exercise answers
tutor_lab_heartbeatajax-exercise-handler.phpKeep-alive for exercise session
tutor_lab_get_lock_statusajax-exercise-handler.phpCheck exercise lock status
tutor_lab_request_unlockajax-exercise-handler.phpStudent requests early unlock
tutor_lab_save_builder_exerciseajax-builder-handler.phpSave exercise JSON from admin builder
tutor_lab_get_quick_correct_dataajax-admin-handler.phpRetrieve data for quick grading
tutor_lab_save_quick_correct_dataajax-admin-handler.phpSave quick grading draft
tutor_lab_publish_feedback_ajaxajax-admin-handler.phpPublish feedback and notify student
tutor_lab_unlock_exercise_ajaxajax-admin-handler.phpAdmin manually unlocks exercise

Gamification

ActionDescription
tutor_lab_mark_resource_as_viewedXP for viewing lesson/document
tutor_lab_award_newsletter_xpXP for newsletter signup
tutor_lab_redeem_rewardRedeem reward with XP
tutor_lab_get_hub_gamification_dataXP/level/badge data for the hub
tutor_lab_get_hub_missions_dataNext available missions
tutor_lab_get_hub_announcement_dataClass announcements
tutor_lab_get_hub_updates_dataRecent activity feed
tutor_lab_get_hub_inbox_badge_dataUnread message counter

Registration & Auth

ActionPrivilegeDescription
tutor_lab_rapid_register_wizardnoprivQuick wizard registration
tutor_lab_full_register_wizardnoprivFull onboarding registration
tutor_lab_activate_licenseadminLicense activation via server
tutor_lab_send_recharge_requestadminAI token recharge request

Administration

ActionDescription
tutor_lab_refresh_matrix_dataRefresh progress matrix
tutor_lab_get_student_activity_logStudent activity log
tutor_lab_save_report_dataSave final report data draft
tutor_lab_upload_creative_imageUpload image for creative simulator
tutor_lab_export_stats_csvExport statistics as CSV
tutor_lab_export_stats_jsonExport statistics as JSON
tutor_lab_import_ics_eventsImport ICS calendar
tutor_lab_save_class_emailSave class email
tutor_lab_generate_feedback_json_templateGenerate feedback JSON template
tutor_lab_get_hub_aggregated_dataAggregated hub data (admin ACTION)
tutor_lab_submit_reviewStudent submits course review

WordPress Hooks

Key Actions

HookPriorityUse
admin_post_tutor_lab_generate_reportdefaultGenerate final class PDF report
admin_post_tutor_lab_publish_feedbackdefaultPublish feedback from admin form
admin_post_tutor_lab_publish_feedback_bulkdefaultPublish feedback in bulk
admin_post_tutor_lab_reset_exercisedefaultReset student answer
admin_post_tutor_lab_unlock_exercisedefaultUnlock exercise
tutor_lab_send_content_notification_cron10Cron: send published content notification
save_post_risposta_studente10, 20Save feedback draft, calculate XP

Key Filters

FilterUse
theme_page_templatesRegisters custom templates: page-canvas.php, template-onboarding-fullscreen.php, simulators
template_includeLoads custom CPT templates (priority 98, 99)
body_classAdds frontend classes (role, class, theme)
admin_body_classAdmin classes for shell styling
wp_authenticate_userBlocks 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() — boolean
  • tutor_lab_is_addon_active($addon) — boolean
  • tutor_lab_get_license_limit($key) — int|null
  • tutor_lab_is_limit_exceeded($key, $count) — boolean

Addon Slugs

  • ai / ai_coach
  • gamification
  • email / email_automation
  • analytics / advanced_reports
  • builder / api_access
  • pdf / pdf_export
  • branding / custom_branding
  • multi_team
  • video / video_lessons
  • sso

Controllable Limits

  • max_students
  • max_teachers
  • max_courses
  • max_exercises
  • max_storage_mb
  • max_ai_calls_month
The token recharge manager (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?
No. Thanks to RAG technology, the AI responds exclusively based on the content of the Knowledge Base. If the answer is not present in the uploaded documents, the AI states this explicitly and suggests contacting the human instructor.
How do I add students to the platform?
Two methods: (1) Bulk CSV import from System → Import Students. (2) Student self-registration via the [tutor_lab_registration_choice] shortcode — registrations land in "pending" status and are approved from the Approvals page.
Can I manage multiple courses simultaneously?
Yes. The Course → Class hierarchy allows you to manage unlimited courses in parallel. Each student only sees the content of the course they are enrolled in. With the multi_team addon, you can manage multiple teams with different instructors per course.
How does the Builder autosave work?
The Builder automatically saves every 30 seconds if there are unsaved changes. The status is visible in the toolbar: Saved (green), Unsaved changes (orange), Saving (blue). Use Ctrl+S / Cmd+S to save manually at any time.
What happens if AI credits run out?
The system sends a warning email when credits drop below the configured threshold. If credits reach zero, AI requests are blocked and a warning message is shown. The instructor can purchase additional credits from the backend via PayPal or Stripe.
How do I modify an email template without PHP?
Go to System → Settings → Email. Each template has a visual editor with basic HTML support, CTA buttons, and dynamic variables ({{USER_NAME}}, {{EXERCISE_TITLE}}, etc.). You can preview and send test emails.
Does the PDF report show the assigned grades?
Yes. The final PDF report includes an evaluation table per student with: student name, submission type, evaluation comment, per-exercise scores (0-5), and totals. Scores are read from _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?
Gamification is controlled at the class level via the term meta _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