edx-enterprise
edx-enterprise copied to clipboard
feat: handle enrollments for "Invite Only" courses
Description
This PR introduces some improvements to the 'Manage Learners' page of Enterprise Customer admin that will allow enrolling learners into "Invite Only" courses.
Refer #1745 for full details about the issue.
Testing instructions
- Follow the testing instructions in #1745 and reproduce the issue
- Switch to the PR branch
- Try enrolling learners into the course marked as "Invite Only", with the Force Enrollment checkbox checked, this time it should work without throwing an error.
- Test with both a learner who already has a registered account and an email which is not registered in the system to ensure, "enrollment on registration" also works for "Invite Only" courses.
Merge checklist:
- [ ] Any new requirements are in the right place (do not manually modify the
requirements/*.txt
files) - No new requirements added-
base.in
if needed in production but edx-platform doesn't install it -
test-master.in
if edx-platform pins it, with a matching version -
make upgrade && make requirements
have been run to regenerate requirements
-
- [ ]
make static
has been run to update webpack bundling if any static content was updated - Running make static didn't introduce any changes - [ ]
./manage.py makemigrations
has been run - No DB migrations introduced- Checkout the Database Migration Confluence page for helpful tips on creating migrations.
-
Note: This must be run if you modified any models.
- It may or may not make a migration depending on exactly what you modified, but it should still be run.
- This should be run from either a venv with all the lms/edx-enterprise requirements installed or if you checked out edx-enterprise into the src directory used by lms, you can run this command through an lms shell.
- It would be
./manage.py lms makemigrations
in the shell.
- It would be
- [ ] Version bumped
- [ ] Changelog record added
- [ ] Translations updated (see docs/internationalization.rst but also this isn't blocking for merge atm)
Post merge:
- [ ] Tag pushed and a new version released
- Note: Assets will be added automatically. You just need to provide a tag (should match your version number) and title and description.
- [x] After versioned build finishes in GitHub Actions, verify version has been pushed to PyPI
- Each step in the release build has a condition flag that checks if the rest of the steps are done and if so will deploy to PyPi. (so basically once your build finishes, after maybe a minute you should see the new version in PyPi automatically (on refresh))
- [ ] PR created in edx-platform to upgrade dependencies (including edx-enterprise)
- This must be done after the version is visible in PyPi as
make upgrade
in edx-platform will look for the latest version in PyPi. - Note: the edx-enterprise constraint in edx-platform must also be bumped to the latest version in PyPi.
- This must be done after the version is visible in PyPi as
Thanks for the pull request, @tecoholic!
What's next?
Please work through the following steps to get your changes ready for engineering review:
:radio_button: Get product approval
If you haven't already, check this list to see if your contribution needs to go through the product review process.
- If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
- This process (including the steps you'll need to take) is documented here.
- If it doesn't, simply proceed with the next step.
:radio_button: Provide context
To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
- Dependencies
This PR must be merged before / after / at the same time as ...
- Blockers
This PR is waiting for OEP-1234 to be accepted.
- Timeline information
This PR must be merged by XX date because ...
- Partner information
This is for a course on edx.org.
- Supporting documentation
- Relevant Open edX discussion forum threads
:radio_button: Get a green build
If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.
:radio_button: Let us know that your PR is ready for review:
Who will review my changes?
This repository is currently unmaintained.
To get help with finding a technical reviewer, tag the community contributions project manager for this PR in a comment and let them know that your changes are ready for review:
- On the right-hand side of the PR, find the Contributions project, click the caret in the top right corner to expand it, and check the "Primary PM" field for the name of your PM.
- Find their GitHub handle here.
Where can I find more information?
If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
- Overview of Review Process for Community Contributions
- Pull Request Status Guide
- Making changes to your pull request
When can I expect my changes to be merged?
Our goal is to get community contributions seen and reviewed as efficiently as possible.
However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
- The size and impact of the changes that it introduces
- The need for product review
- Maintenance status of the parent repository
:bulb: As a result it may take up to several weeks or months to complete a review and merge your PR.
@tecoholic it looks like the branch has conflicts, can you have a look?
@e0d I have rebased the PR branch and bumped the version in enterprise/__init__.py
. Conflicts are now resolved.
@tecoholic Looks like there are some conflicts that need to be resolved, can you have a look?
@e0d I have rebased it on master and fixed the conflicts. Can you kindly approve the tests to run?
@tecoholic Tests approved.
@e0d Looks like all checks have passed. Can you kindly see if this can be reviewed and merged?
Hi @macdiesel and @openedx/enterprise-titans! Could someone please review and merge this if all looks good? Thanks!
@mphilbrick211 Hi, can you kindly get someone to take a look at this?
Hi @macdiesel and @openedx/enterprise-titans! Friendly ping on this :)
In the meantime, @tecoholic, would you mind resolving the branch conflicts? Thanks!
@mphilbrick211 Done. All good w.r.t conflicts. The CI tests require approval to run.
Hi @tecoholic - tests are running again, but there are some more branch conflicts that have popped up.
@mphilbrick211 I think the conflicts will continue to happen on the changelog and the version number as long as things are changing on the master and it would be a daily task to keep resolving them. So, I am think we could do either of the 2 things:
- Kindly ping me when someone picks this up for review and I can resolve the conflicts
- Or the reviewer can resolve it as long as it is just the change-log entry and the version number and it doesn't touch any code.
What do you think?
@tecoholic I've approved the tests, but looks like there's a conflict.
@tecoholic I've approved the tests, but looks like there's a conflict.
@e0d I have fixed the conflicts.
@tecoholic I've run the tests, but there are conflicts that require resolution. For easy merges, we typically do them from the GitHub UI, but Demid pointed out this doesn't work with organizational forks, https://github.com/orgs/community/discussions/5634
@e0d Hi, I have resolved the conflict. If it runs into conflict again, I guess it wouldn't be possible for you to make changes as Demid pointed out. Would like me to squash the changed into a single commit, that would allow you to cherry-pick and resolve conflicts locally and merge?
@tecoholic I don't think I'm going to be able to take over conflict management.
I did notice that a number of the OpenCraft PRs are broken because of a doc formatting issue. See my commit here.
@e0d Hi, since the conflicts have been occurring on the version bump and the changelog, I have removed them from the PR and rebased it to the latest master. Kindly see if this helps.
@tecoholic, since the upstream review for this didn't start yet, you can squash the commits. It will be easier to cherry-pick this to our Palm branch.
@mphilbrick211 this branch will need a rebase when the reviewers are ready to look at it, but the tests are all green. Removing the label.
Hi @openedx/enterprise-titans! Following up to see if we could please get this reviewed/merged. Thanks!
Hi @tecoholic! Some branch conflicts have popped up - would you mind taking a looK?
@mphilbrick211, I believe it would make sense to move forward with this document first. Without a timeline for these reviews, the branch conflicts will appear regularly.
cc: @tecoholic
@mphilbrick211, I believe it would make sense to move forward with this document first. Without a timeline for these reviews, the branch conflicts will appear regularly.
cc: @tecoholic
Sounds good - thanks, @Agrendalath!
Hi @openedx/enterprise-titans! Is there an ETA on when someone could please review this? Thanks!
Hi @openedx/enterprise-titans! Is there an ETA on when someone could please review this? Thanks!
Hi @openedx/enterprise-titans - following up on this!
@openedx/enterprise-titans The PR has been rebased on master and all the checks are passing. Kindly review.
cc: @e0d
Hi @openedx/2u-titans! Are you still reviewing pull requests? If so, could you please review / merge this for us? Thanks!