Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: send LEARNER_CREDIT_COURSE_ENROLLMENT_REVOKED from the correct place. #2234

Merged
merged 2 commits into from
Sep 10, 2024

Commits on Sep 10, 2024

  1. fix: send LEARNER_CREDIT_COURSE_ENROLLMENT_REVOKED from the correct p…

    …lace.
    
    I had originally tried emitting this event from the `/cancel_enrollment`
    API endpoint, but in reality the LMS and Enterprise dashboards were
    calling the `/change_enrollment` endpoint.  The former is called by
    enterprise-subsidy on transaction reversal, i.e. NOT learner-initiated.
    The latter is learner-initiated, and that's the original goal of this
    work.
    
    Changes in this commit:
    * Update the event emission to live closer to the fulfillment
      model itself (inside `revoke()`).
    * Ensure that when an EnterpriseCourseEnrollment is unenrolled, the
      related Fulfillment subclass is revoked. This is a best-effort to
      improve internal consistency during learner-initiated unenrollment.
    * Consumers of the various enrollment models are now expected to call
      helper functions to unenroll/reenroll/revoke/reactivate rather than
      directly set internal fields.
    
    ENT-9213
    pwnage101 committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    987c81b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9dc7502 View commit details
    Browse the repository at this point in the history