edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

[BB-5195] feat: disable auto enrollment after course enrollment ends

Open kaustavb12 opened this issue 4 years ago • 10 comments

Description

This PR seeks to address the following scenario:

  1. Non-registered user is enrolled in a course
  2. Course enrollment ends
  3. User registers after course enrollment has ended
  4. User in enrolled to the course anyways

This PR introduces a feature flag "DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED" which when set to True, the newly registered user is not automatically enrolled to the course if the enrollment has ended.

Impacted user roles : Learner

Supporting information

Testing instructions

  1. Set the "DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED" flag to true
  2. As a staff user, enroll an email-id to a course and set auto-enroll to true.
  3. From the studio settings, set the course enrollment end date to a past date, so that the enrollment ends.
  4. Register to the lms, using the email-id enrolled above.
  5. Check that the user is NOT enrolled to the course

kaustavb12 avatar Dec 09 '21 07:12 kaustavb12

Thanks for the pull request, @kaustavb12! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

openedx-webhooks avatar Dec 09 '21 07:12 openedx-webhooks

@kaustavb12 Thank you for your contribution. Is this ready for our review?

natabene avatar Dec 15 '21 17:12 natabene

@natabene, not yet - we're still discussing the approach internally, so I've converted this to a draft. We will ping you once it's ready for your review.

Agrendalath avatar Dec 15 '21 18:12 Agrendalath

Your PR has finished running tests. There were no failures.

edx-status-bot avatar Dec 15 '21 19:12 edx-status-bot

@kaustavb12 @Agrendalath Just checking if this is still on your radar.

natabene avatar May 19 '22 18:05 natabene

@natabene, just in time. We have scheduled resuming this for our ongoing sprint :)

Agrendalath avatar May 19 '22 18:05 Agrendalath

@natabene, this is ready for your review.

Agrendalath avatar Jun 12 '22 18:06 Agrendalath

New internal ticket link: https://2u-internal.atlassian.net/browse/TNL-9987

natabene avatar Jun 22 '22 18:06 natabene

Branch rebased and merge conflicts resolved.

Unrelated test case failing after recent changes in master.

kaustavb12 avatar Jun 23 '22 13:06 kaustavb12

Rebased again .. all checks are now green.

kaustavb12 avatar Jun 30 '22 07:06 kaustavb12

Hi @Agrendalath! Just checking on this. Are you able to merge this, or is there a reason it is still open? Is it waiting on other work?

mphilbrick211 avatar Dec 12 '22 22:12 mphilbrick211

Thanks for checking, @mphilbrick211. I rebased this (just in case) and will merge it in ~2 hours.

Agrendalath avatar Dec 13 '22 12:12 Agrendalath

@kaustavb12 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

openedx-webhooks avatar Dec 13 '22 14:12 openedx-webhooks

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

edx-pipeline-bot avatar Dec 13 '22 17:12 edx-pipeline-bot

EdX Release Notice: This PR has been deployed to the production environment.

edx-pipeline-bot avatar Dec 13 '22 17:12 edx-pipeline-bot

EdX Release Notice: This PR has been deployed to the production environment.

edx-pipeline-bot avatar Dec 13 '22 17:12 edx-pipeline-bot