Skip to content

Gate advanced course enrollment on assessment / skillLevel #1061

@jeromehardaway

Description

@jeromehardaway

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

  • Enrollment API (/api/enrollments or equivalent) rejects enrollment in ADVANCED courses for users below the threshold.
  • Client-side UI disables/explains the block (don't let the user submit and then fail).
  • Instructor/admin override path exists.
  • Tests cover the gating logic.

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." });
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions