Skip to content

Course enrollment status is a placeholder (TODO in curriculum panel) #1060

@jeromehardaway

Description

@jeromehardaway

Problem

src/containers/course-details/curriculam-panel.tsx contains: TODO: Replace with actual course enrollment check from database. Current enrollment indicator shown to users is not sourced from the Enrollment table.

Expected behavior

Enrollment status reflects the real Enrollment record for the current user + course.

Acceptance criteria

  • Component queries (or receives via props from a server component) the user's active enrollment for the given course.
  • "Enroll" vs "Continue" vs "Completed" states rendered correctly based on Enrollment.status.
  • Works server-rendered (don't flash "Enroll" before fetching on the client).

Suggested approach

Fetch Enrollment in getServerSideProps for the course-detail page and pass enrollment state down as a prop. Don't hit the DB from the client.

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