Get Hedhog updates in your inbox
New releases, fresh recipes, and breaking changes — no spam.
LMS Submodule
learning-paths
Ordered sequences of courses and exams ("training paths") with sequential or free progression modes.
Source path: libraries/lms/src/training
Module file: training.module.ts
Introduction
A learning path is a curated, ordered list of items — each either a course or an exam — that a student works through under one of two progression modes: sequential (each item must be completed before the next unlocks) or free (items can be taken in any order). Despite the source folder and internal class names (`TrainingController`, `TrainingService`, `TrainingModule`) using the word "training," the REST surface is mounted at `/lms/paths`, not under `/lms/enterprise/training/*` — that is a completely unrelated set of controllers (the Enterprise submodule's role-scoped portals). The shared word is a naming coincidence in the source tree, not a code relationship; there is no shared service or controller between the two.
Creating or updating a path accepts either a flat `courseIds` array (for a simple, implicitly-ordered list) or a richer `items` array that explicitly types each entry as course or exam, sets its order, and marks whether it is required for path completion. Updating a path's `items`/`courseIds` replaces its full step list rather than diffing it. Path creation/update/deletion each publish an `lms.training.created` / `lms.training.updated` / `lms.training.deleted` integration event for downstream consumers — e.g. systems that need to recompute a student's available next-step recommendations when a path's structure changes.
HTTP Endpoints
6 endpoints
Paginated, filterable learning path list.
- Query
- page, pageSize, search, status, level, area
Aggregate stats: total/active paths, enrolled students, covered courses.
Gets a learning path with its ordered course/exam items.
- Params
- id (int)
Creates a learning path; auto-slugifies the title if no slug given; publishes lms.training.created.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
| title | string | yes | Max 255 chars |
| slug | string | no | — |
| description | string | no | — |
| shortDescription | string | no | — |
| level | 'beginner' | 'intermediate' | 'advanced' | no | — |
| status | 'draft' | 'active' | 'archived' | no | — |
| progressMode | 'sequential' | 'free' | no | — |
| courseIds | number[] | no | Simple flat course list |
| items | LearningPathItemDto[] | no | { type: 'course' | 'exam', itemId, order?, isRequired? }[] |
| primaryColor | string | no | Max 32 chars |
| secondaryColor | string | no | Max 32 chars |
| bannerFileId | number | null | no | — |
Updates a path; replaces the full step list if items/courseIds is supplied; publishes lms.training.updated.
- Params
- id (int)
Deletes a learning path; publishes lms.training.deleted.
- Params
- id (int)
MCP Tools
Named tools callable by AI models via the Model Context Protocol (MCP).
lms.paths.listLists learning paths with optional pagination and filters
lms.paths.statsReturns aggregate statistics for learning paths
lms.paths.getReturns a single learning path by ID with its course/exam items
lms.paths.createCreates a new learning path
lms.paths.updateUpdates an existing learning path
lms.paths.deleteRemoves a learning path by ID