What: Add an endpoint that returns detailed enrollment status for the current user in a specific course.
Why: The frontend needs to show different UI states based on enrollment status (not enrolled, enrolled, completed, dropped). Currently there's no way to get detailed status.
Scope: Create endpoint that returns: isEnrolled, enrolledAt, completedAt, moduleProgress (array of module completion status), quizCount, averageScore.
Acceptance criteria:
- Returns detailed enrollment status
- Includes module-by-module progress
- Cached for 30s
- Returns 404 for non-existent courses
Technical context: src/modules/courses/course.service.ts — enrollment queries. src/database/schema.ts — enrollments and quizzes tables.
What: Add an endpoint that returns detailed enrollment status for the current user in a specific course.
Why: The frontend needs to show different UI states based on enrollment status (not enrolled, enrolled, completed, dropped). Currently there's no way to get detailed status.
Scope: Create endpoint that returns: isEnrolled, enrolledAt, completedAt, moduleProgress (array of module completion status), quizCount, averageScore.
Acceptance criteria:
Technical context:
src/modules/courses/course.service.ts— enrollment queries.src/database/schema.ts— enrollments and quizzes tables.