Summary
Introduce Adaptive Learning Paths so students unlock content based on mastery, not just linear order. Instructors define prerequisites (courses/lessons/quizzes), rules (min score, completion %, time limits), and skills/tags. The system computes a personalized “Next best step” and shows recommendations on the dashboard.
Problem / Motivation
-
Current flow appears mostly linear. Many LMS users expect:
- Prerequisite gating (e.g., “Score ≥ 80% on Quiz 1 to unlock Lesson 2”).
- Personalized recommendations (e.g., “Practice questions on Algebra → Difficulty: Medium”).
- Clear paths for different roles (self-paced tracks, instructor-curated sequences).
-
This improves completion rates, reduces churn, and makes progress tracking more actionable.
Goals
- Let instructors create graph-based paths with DAG validation (no cycles).
- Enforce unlock rules at runtime using existing progress/quiz data.
- Show each learner a My Path view with progress, locked/unlocked nodes, and Next best step.
- Provide recommendations based on recent performance, difficulty, and skills.
Non-Goals
- Full ML personalization in v1 (can add later).
- External standards (SCORM/xAPI) in v1.
High-Level Design
Data Model (MongoDB)
New collections (suggested):
learning_paths: { _id, title, description, owner_id, is_active, created_at }
path_nodes: { _id, path_id, type: "course"|"lesson"|"quiz", ref_id, position, skills: [string], difficulty: "easy"|"medium"|"hard" }
prerequisites: { _id, node_id, requires_node_id, rules: { min_score?, min_completion_pct?, within_days? } }
recommendation_snapshots: { _id, user_id, items: [{ node_id, reason, score }], generated_at }
Indexes:
path_nodes(path_id), prerequisites(node_id), recommendation_snapshots(user_id, generated_at)
Backend (Django + DRF)
-
Rule evaluation service:
- On progress/quiz updates, recompute unlock state for affected nodes.
- Use Redis for caching
{user_id,node_id} → unlocked:boolean.
- Validate DAG on create/update (detect cycles).
-
Endpoints (v1):
GET /api/paths/ – list active paths (admin/instructor scoped).
POST /api/paths/ – create path; body includes nodes and prerequisites.
GET /api/paths/{id}/nodes/ – list nodes with lock/unlock state for the current user.
GET /api/paths/{id}/recommendations/?user_id=current – top N recommended nodes.
POST /api/paths/{id}/validate/ – returns DAG validation result & rule conflicts.
-
Signals/Tasks:
- On
progress.updated and quiz.result.created, enqueue recompute (optional Celery with Redis).
-
OpenAPI (excerpt)
paths:
/api/paths/{id}/recommendations/:
get:
summary: Get personalized recommendations for current user
parameters:
- in: path
name: id
schema: { type: string }
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
items:
type: array
items:
type: object
properties:
node_id: { type: string }
title: { type: string }
reason: { type: string }
score: { type: number, format: float }
Frontend (Angular)
DevOps / CI/CD
- Feature flag:
ADAPTIVE_PATHS_ENABLED (env + ConfigMap).
- Optional worker (Celery) deployment using existing Redis.
- Seed script updates: create sample path with 5–7 nodes and varied prerequisites.
Security & Permissions
- Instructors can CRUD paths for their courses.
- Students read-only; only their own unlock states and recommendations.
- Validate references (
ref_id) to existing course/lesson/quiz docs.
Performance
- Cache unlock states per user/node in Redis; TTL invalidate on relevant events.
- Batch queries when computing recommendations.
Analytics / Metrics
- Track funnel: Nodes unlocked → Started → Completed.
- Track path completion time, retries after failing a rule, recommendation CTR.
Accessibility
- Ensure lock/unlock states have ARIA annotations and non-color indicators.
Acceptance Criteria
Rollout Plan
- Behind flag in staging → instructor beta → all users.
- Migrate seed and sample content.
- Monitor metrics & logs; tune rules and caching.
- Document authoring best practices (skills, difficulty, rules).
Risks & Mitigations
- Complex graphs / infinite loops → DAG validation on save.
- Over-restrictive rules → Preview/validate mode before publish.
- Cache staleness → Event-driven invalidation on progress/quiz write.
Open Questions
- Do we need time-boxed rules (e.g., “complete within 7 days of enrollment”) in v1?
- Should recommendations consider engagement (last active date) versus mastery only?
- Do we expose skill-level metadata in public APIs for 3rd-party clients?
Tasks
Backend
Frontend
DevOps/Docs
Value
This adds a high-impact, widely expected LMS capability using the current MAD stack primitives (MongoDB, Angular, Django, Redis) and fits neatly into existing CI/CD and PWA setup. It’s incremental (flagged), testable, and unlocks deeper personalization later (ML-powered ranking).
Summary
Introduce Adaptive Learning Paths so students unlock content based on mastery, not just linear order. Instructors define prerequisites (courses/lessons/quizzes), rules (min score, completion %, time limits), and skills/tags. The system computes a personalized “Next best step” and shows recommendations on the dashboard.
Problem / Motivation
Current flow appears mostly linear. Many LMS users expect:
This improves completion rates, reduces churn, and makes progress tracking more actionable.
Goals
Non-Goals
High-Level Design
Data Model (MongoDB)
New collections (suggested):
learning_paths:{ _id, title, description, owner_id, is_active, created_at }path_nodes:{ _id, path_id, type: "course"|"lesson"|"quiz", ref_id, position, skills: [string], difficulty: "easy"|"medium"|"hard" }prerequisites:{ _id, node_id, requires_node_id, rules: { min_score?, min_completion_pct?, within_days? } }recommendation_snapshots:{ _id, user_id, items: [{ node_id, reason, score }], generated_at }Indexes:
path_nodes(path_id),prerequisites(node_id),recommendation_snapshots(user_id, generated_at)Backend (Django + DRF)
Rule evaluation service:
{user_id,node_id} → unlocked:boolean.Endpoints (v1):
GET /api/paths/– list active paths (admin/instructor scoped).POST /api/paths/– create path; body includes nodes and prerequisites.GET /api/paths/{id}/nodes/– list nodes with lock/unlock state for the current user.GET /api/paths/{id}/recommendations/?user_id=current– top N recommended nodes.POST /api/paths/{id}/validate/– returns DAG validation result & rule conflicts.Signals/Tasks:
progress.updatedandquiz.result.created, enqueue recompute (optional Celery with Redis).OpenAPI (excerpt)
Frontend (Angular)
New My Path page:
/my-path/:pathIdComponents:
PathOverviewComponent,PathNodeItemComponent,RecommendationCardComponent.Guards:
PrereqGuardto block navigation to locked routes with a friendly toast explaining required criteria.Services:
PathService(paths/nodes/prereqs),RecommendationService.UX details:
DevOps / CI/CD
ADAPTIVE_PATHS_ENABLED(env + ConfigMap).Security & Permissions
ref_id) to existing course/lesson/quiz docs.Performance
Analytics / Metrics
Accessibility
Acceptance Criteria
ADAPTIVE_PATHS_ENABLED.Rollout Plan
Risks & Mitigations
Open Questions
Tasks
Backend
learning_paths,path_nodes,prerequisites,recommendation_snapshotsFrontend
DevOps/Docs
Value
This adds a high-impact, widely expected LMS capability using the current MAD stack primitives (MongoDB, Angular, Django, Redis) and fits neatly into existing CI/CD and PWA setup. It’s incremental (flagged), testable, and unlocks deeper personalization later (ML-powered ranking).