feat(selfpaced): student-facing My Programs dashboard
- ProgramsTab.jsx: Active/Completed programs, real progress, deterministic Continue Learning (reuses the same launch/poll pattern MyLearningTab already established), entitlement-blocked states shown with a real reason, never a silent dead end. - StudentDashboard.jsx: new My Programs tab. api.js: programs/program/launchProgram.
This commit is contained in:
@@ -119,4 +119,9 @@ export const api = {
|
||||
leaveClassroom: (id) => mutate(`/api/classroom/${id}/leave`),
|
||||
classroomHeartbeat: (id) => mutate(`/api/classroom/${id}/heartbeat`),
|
||||
requestHelp: (id, category, message) => mutate(`/api/classroom/${id}/help-request`, { category, message }),
|
||||
|
||||
// ── Phase 5B: self-paced programs ────────────────────────────────────────────────────────
|
||||
programs: () => fetch('/api/student/programs').then(json),
|
||||
program: (enrollmentId) => fetch(`/api/student/programs/${enrollmentId}`).then(json),
|
||||
launchProgram: (enrollmentId) => mutate(`/api/student/programs/${enrollmentId}/launch`),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user