Agent Training Center — LMS & Certification Guide
Build mandatory compliance courses, grade quizzes automatically (respecting each course's own passing score), and issue verifiable certificates with public verification URLs — all from a proper 3-pane course builder. V2 is a ground-up rebuild with a new TrainingEngine class consolidating the logic that was scattered across API endpoints in V1.
Overview
The Agent Training Center is a complete LMS (learning management system) for contact centers, compliance-driven organizations, and any business that needs to track which agents have completed which training. V2 is built around three concepts:
- Courses — the top-level thing a learner enrolls in. Has a title, type (mandatory / optional / certification / onboarding), passing score, max attempts, and an icon.
- Modules — the units inside a course. Each one is a video, document, quiz, interactive embed, or assignment. Marked required or optional.
- Questions — inside quiz modules. Four types: multiple choice, true/false, short answer, essay. Each question has its own points value and an optional explanation shown after grading.
The agent-facing CRM tab shows a course catalog with progress bars, a module-by-module player, inline quiz grading, and a My Certifications tab. The tenant-admin side has a 3-pane builder for creating all of it.
What's new in V2
V1 of the module had most of the database schema right (12 tables!) but the code was incomplete:
Broken SQL: display_order column didn't exist
The course list API was ORDER BY tc.display_order against a column that wasn't in the schema. V2 migration adds the column (and an icon column for UI iconography). The V2 code also orders correctly.
passing_score was ignored
V1's quiz submission endpoint hardcoded 80% as the pass threshold regardless of what the course's passing_score column said. V2 reads the value from the course and compares correctly. Tenants can now set HIPAA courses at 90% and onboarding at 70% independently.
Certificates never got a verification URL
V1 set pdf_url to null on every cert issuance. V2 generates a verification_code (16 hex characters), builds the URL as /certificate.php?code=..., and stores it on the row. The public verification page is brand new.
No course builder UI
V1 required admins to INSERT directly into training_courses, training_modules, and training_questions. V2 ships a proper 3-pane builder at /tenant-admin/modules/training-builder.php.
max_attempts wasn't enforced
V1 counted attempts but never blocked a learner from submitting more. V2 refuses submission once the learner hits max_attempts and returns a clear out_of_attempts response.
Quiz questions exposed correct_answer
V1's get-questions endpoint included the correct answer in the JSON payload, so any learner inspecting the network response could cheat. V2 strips it on the agent-facing endpoint — grading happens server-side in TrainingEngine::gradeQuiz.
Course types
The type column doesn't change enrollment mechanics — all courses work the same — but it drives UI chips and can be filtered on in reporting. Pick the one that matches the course's purpose:
Mandatory
Must be completed by all agents. Shows a red chip in the catalog. Typically used for compliance (HIPAA, PCI, FDCPA).
Optional
Available for self-directed learning. Skills development, advanced topics, knowledge-base content.
Certification
Industry certification programs. Usually higher passing score (90%+) and fewer attempts. Gold chip in the catalog.
Onboarding
New-hire courses. Usually required within the first 30 days. Can be chained into a learning path (schema supports this; UI in V2.1).
Content types (modules)
Each module has a content type that determines how learners interact with it:
Video
Embed a URL — YouTube, Vimeo, Loom, or any iframe-embeddable video. Stored as a URL; the module viewer drops it into an iframe.
Document
HTML content rendered inline. Use for written lessons, policy documents, or step-by-step instructions with images and links.
Quiz
Graded questions. Only quiz modules can have questions attached. Submission triggers auto-grading + certificate issuance if passed.
Interactive
URL embed for H5P content, scenario simulators, branching dialogs, or third-party interactive tools.
Assignment
Written task for the learner. Marked complete manually (or via learner attestation). Supports admin review in future releases.
Quiz grading
Every question type is graded server-side by TrainingEngine::gradeQuiz(). The correct answer is stored in the database but never exposed to the agent UI. Grading logic per type:
- Multiple choice — case-insensitive string compare against the stored
correct_answer. Options stored as a JSON array. - True/false — case-insensitive compare. Options locked to
True/False. - Short answer — trimmed, case-insensitive compare. Use when there's exactly one correct textual response (e.g. "PHI").
- Essay — auto-grade returns false. Questions of this type need manual review by an admin; V2.1 will ship a review UI. For now, essay questions are best used alongside multiple choice / true-false so the quiz can still auto-grade partially.
Each question has a points value (default 1). The learner's percentage is (points_earned / points_possible) × 100. If the percentage ≥ course.passing_score, the enrollment flips to completed and a certificate is automatically issued. Otherwise the enrollment stays active and the learner can retry (subject to max_attempts).
Every submission increments training_enrollments.attempts. Once that counter hits max_attempts, further submissions return an out_of_attempts error. Admins can reset an enrollment or raise max_attempts on the course to unblock.
Certificates & public verification
When a learner passes a course, TrainingEngine::issueCertificate() writes a row to training_certifications with:
certificate_number— human-readable ID likeRUBI-TRN-A1B2C3D4E5verification_code— 16-character hex, used in the public URLpdf_url— set to/certificate.php?code=<verification_code>score— percentage the learner earnedissued_at— timestamp
The public verification page at /certificate.php accepts a ?code= query string and displays:
- The learner's name
- The course title
- The score (final percentage)
- The duration (from the course's
duration_hours) - The issuing tenant
- A status banner: Verified, Expired, or Revoked
Anyone with the verification code can confirm authenticity without a Rubi account. Employers, auditors, and state licensing boards can all verify directly. The page has a Print / Save as PDF button that triggers the browser's native print flow — @media print CSS hides the header, lookup bar, and status banner, leaving only the gold-bordered certificate for clean output.
Revoking a certificate: set training_certifications.revoked_at = NOW() and revoked_reason = '...'. The public page detects this and shows a red banner explaining the revocation. The record is kept — never deleted — for audit.
Quick start ≈ 20 minutes
- Activate the module at RubiMine. Billing is $149.99/mo, unlimited learners.
- Sysadmin runs the migration at
/admin/run-training-v2-migration.phpto add thedisplay_orderandiconcolumns and verify all 12training_*tables. - Open the course builder at /tenant-admin/modules/training-builder.php. Hit + New on the Courses pane.
- Fill in course basics — title, description, type (mandatory / optional / certification / onboarding), passing score (default 80%), max attempts (default 3), icon (Font Awesome class name without the
fa-prefix — e.g.fa-shield-halved). Save asdraftfirst. - Add modules — select the course and hit + New in the Modules pane. Pick a content type, set duration, decide if it's required. For videos, paste the embed URL. For documents, write the HTML body.
- Write quiz questions — select a quiz-type module and hit + New in the Questions pane. Pick type, write the question text, fill in correct answer, add options (for multiple choice), set points and an optional explanation.
- Activate the course — edit it and flip
statusfromdrafttoactive. It now appears in the agent-facing CRM Training tab for every user. - Learners enroll and complete — from the CRM, agents click the Training tab, pick a course, hit Start, work through modules, submit the quiz, and — if they pass — collect an auto-issued certificate with a public verification URL.
API endpoints
All endpoints are tenant-scoped via the session. No tokens needed — sessions only.
Agent-facing (/crm/api/training.php)
GET ?action=get_user_courses → course list + enrollment state
GET ?action=get_course_detail&course_id=N
GET ?action=get_quiz_questions&module_id=N (correct_answer hidden)
GET ?action=get_certifications → current user's certs
POST action=start_course (course_id)
POST action=mark_module_progress (course_id, module_id, status, score?, time_spent_minutes?)
POST action=submit_assessment (course_id, answers={question_id: answer, ...})
Admin-facing (/tenant-admin/api/training-admin.php)
GET ?action=stats → tenantStats() GET ?action=list_courses GET ?action=list_modules&course_id=N GET ?action=list_questions&module_id=N POST action=save_course (csrf_token, id?, title, description, type, status, ...) POST action=save_module (csrf_token, id?, course_id, title, content_type, ...) POST action=save_question (csrf_token, id?, module_id, question_text, question_type, ...) POST action=archive_course (csrf_token, id) POST action=delete_module (csrf_token, id) POST action=delete_question (csrf_token, id)
Known limitations (V2)
- Essay grading: essay questions return false from the auto-grader and need manual review. V2.1 will ship an admin review UI for essay responses.
- Learning paths: the schema supports chained courses (
training_learning_paths,training_path_courses), but no UI yet. V2.1 roadmap. - Compliance requirements:
training_compliance_requirementsmaps courses to compliance frameworks (HIPAA, PCI, etc.) — schema only, no UI. - Certificate revocation UI: revoking requires a direct SQL update today. Dashboard button coming in V2.1.
- Module drag-to-reorder: sort order is set via a numeric field in the module modal. Drag-and-drop reordering is on the roadmap.
- Analytics:
training_analytics_eventstable exists but isn't populated yet. V2.1 will track module-level engagement (time spent, drop-off points, etc.).
Frequently asked questions
How does the quiz auto-grader work?
TrainingEngine::gradeQuiz(). Multiple choice / true-false use case-insensitive string compare against the stored correct_answer. Short answer uses case-insensitive trimmed compare. Essay returns false — needs manual grading by an admin. Percentage = (earned / total_points) × 100. If ≥ course's passing_score, enrollment flips to completed + certificate is issued automatically.How are certificates verified?
/certificate.php?code=... — public, no login. Employers paste the code and see learner name, course title, score, issuance date, and issuing tenant. Page shows a clear status banner: Verified, Expired, or Revoked.Can I print a certificate to PDF?
What happens when a learner fails?
training_enrollments.attempts. Score + pass/fail shown on results screen. If attempts remain (attempts < max_attempts), learner can retry from the results page. Once max is hit, further submissions are refused; admin must reset or raise max_attempts.Who can build courses?
/tenant-admin/modules/training-builder.php. API requires CSRF on every write. Agents see the catalog but cannot create / edit / delete courses.What content types are supported?
How does passing_score enforcement work?
Can I revoke a certificate?
training_certifications.revoked_at = NOW() and revoked_reason = '...'. Public verification page detects this and shows a red Revoked banner with reason and date. Record is kept for audit — never deleted. Revocation UI coming in V2.1.How much does Agent Training Center cost?
Ready to build your first course?
Activate the Agent Training Center module in RubiMine, run the migration, then open the course builder. Takes about 20 minutes from activate to first published course.