Skip to content

Conversation

@Ang-m4
Copy link
Contributor

@Ang-m4 Ang-m4 commented Nov 25, 2025

Description

This pull request refactors the enrollment logic to align with the current business requirements.
It adds a new enroll endpoint inside the learner API so that course enrollments can be triggered directly from the learning paths MFE.

Key changes

  • Added a new enroll endpoint at /catalogs/<catalog_id>/courses/<course_id>/enroll, called as the learner user, to create the CatalogCourseEnrollment.
  • Introduced a new CatalogCourseEnrollmentService to centralize all course enrollment operations (create, activate, deactivate) with consistent validation.
  • Added an enrollments.py policies module to enforce business rules and keep validation logic separate from the service layer.
  • Ensured that, when this endpoint is called, the corresponding edX enrollment is also created (or updated) in the platform as needed.

@Ang-m4 Ang-m4 changed the title feat: implement catalog course enrollment management services [WIP] feat: implement catalog course enrollment management services Nov 27, 2025
@Ang-m4 Ang-m4 force-pushed the afg/enrollments-services branch from 1c4ee41 to edfaee5 Compare December 2, 2025 21:45
@Ang-m4 Ang-m4 changed the title [WIP] feat: implement catalog course enrollment management services [WIP] feat: implement catalog course enrollment service Dec 2, 2025
@Ang-m4 Ang-m4 changed the title [WIP] feat: implement catalog course enrollment service feat: implement catalog course enrollment service Dec 2, 2025
@Ang-m4 Ang-m4 marked this pull request as ready for review December 2, 2025 21:46
@Ang-m4 Ang-m4 merged commit 9c44ba6 into main.v2 Dec 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants