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

feat: add filter in CourseEnrollmentAllowed. #125

Merged

Conversation

anfbermudezme
Copy link

@anfbermudezme anfbermudezme commented May 31, 2024

Description

This PR adds the enrollment filter into CourseENrollmentAllowed to apply license enforcement when a license reach the purchased seats.

Changes Made

  • Add filter in enroll_email function where the enrollment allowed is triggered.

PR related

How to test

  • Start openedx services with course operation and license enforcement
  • Create institution, institution admin and a license with 0 purchased seats
  • Add the following setting in lms/envs/common.py
OPEN_EDX_FILTERS_CONFIG = {
    "org.openedx.learning.course.enrollment.started.v1": {
        "fail_silently": False,
        "pipeline": [
            "pearson_course_operation.pipeline.EnforceLicense",
        ]
    },
}
  • Create a CCX created from the master course of the license created.
  • Try to Enroll a student or Pending student, using the institution portal being Global Admin and Institution Admin. Using the instructor membership tab being Global Admin and being Institution Admin using the ccx_coach tab of the CCX.
  • Verify that the enrollment is not executed.
  • Add 1 purchased seat into the License, repeat the proccess and then try to add another one. We expect that the purchased seats limit the enrollments.

@anfbermudezme anfbermudezme force-pushed the and/enrollments-allowed-filter branch from 4d617e3 to 65f84aa Compare May 31, 2024 19:11
@anfbermudezme anfbermudezme force-pushed the and/enrollments-allowed-filter branch from 65f84aa to 02fcb57 Compare May 31, 2024 19:11
@anfbermudezme anfbermudezme merged commit 8a272e7 into pearson-release/olive.stage Jun 3, 2024
5 of 35 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.

2 participants