Problem
The assessment (/assessment) records a skillLevel on the user, but nothing in the enrollment flow consults it. Students can enroll in advanced courses (e.g., Advanced AI Engineering) with no prerequisite check.
Expected behavior
Courses declared as ADVANCED difficulty require the enrolling user to have a minimum recorded skillLevel (or a documented instructor override).
Acceptance criteria
Blocked by
Suggested approach
Server-side check in enrollment handler:
if (course.difficulty === "ADVANCED" && user.skillLevel !== "SENIOR") {
return res.status(403).json({ error: "Prerequisite: complete the skill assessment." });
}
Problem
The assessment (
/assessment) records askillLevelon the user, but nothing in the enrollment flow consults it. Students can enroll in advanced courses (e.g., Advanced AI Engineering) with no prerequisite check.Expected behavior
Courses declared as
ADVANCEDdifficulty require the enrolling user to have a minimum recordedskillLevel(or a documented instructor override).Acceptance criteria
/api/enrollmentsor equivalent) rejects enrollment inADVANCEDcourses for users below the threshold.Blocked by
Suggested approach
Server-side check in enrollment handler: