wiki:EnrollingCourse

Enrolling in a Course

Actors: Registered User (USER)

1. Verify Active Subscription.

SELECT 1
FROM user_subscription
WHERE user_id = :userId
  AND status = 'ACTIVE'
  AND end_date >= CURRENT_DATE;

2. Check Existing Enrollment.

SELECT 1
FROM enrollment
WHERE user_id = :userId
  AND course_id = :courseId;

3. Create Enrollment Record.

INSERT INTO enrollment ( user_id, course_id, enroll_date, completion_status, progress_percentage)
VALUES ( :userId, :courseId, CURRENT_DATE, 'IN_PROGRESS', 0);

Last modified 5 weeks ago Last modified on 01/22/26 03:35:36
Note: See TracWiki for help on using the wiki.