Logotipo Hedhog

Get Hedhog updates in your inbox

New releases, fresh recipes, and breaking changes — no spam.

Back to LMS modulesLMS Submodule

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

FieldTypeRequiredNotes
titlestringyesMax 255 chars
slugstringno
descriptionstringno
shortDescriptionstringno
level'beginner' | 'intermediate' | 'advanced'no
status'draft' | 'active' | 'archived'no
progressMode'sequential' | 'free'no
courseIdsnumber[]noSimple flat course list
itemsLearningPathItemDto[]no{ type: 'course' | 'exam', itemId, order?, isRequired? }[]
primaryColorstringnoMax 32 chars
secondaryColorstringnoMax 32 chars
bannerFileIdnumber | nullno

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

    Lists learning paths with optional pagination and filters

  • lms.paths.stats

    Returns aggregate statistics for learning paths

  • lms.paths.get

    Returns a single learning path by ID with its course/exam items

  • lms.paths.create

    Creates a new learning path

  • lms.paths.update

    Updates an existing learning path

  • lms.paths.delete

    Removes a learning path by ID