-
Notifications
You must be signed in to change notification settings - Fork 8
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: avoid using the email enrollment endpoint to fix a bug in versions without email support #59
Conversation
…ns without email support
Thanks for the pull request, @MaferMazu! 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:
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. |
Hello @julianramirez2, can you help me review this, please? |
Hello @felipemontoya, can you help me review this, please? |
This PR works by changing the value passed to What I'm wondering is what would be the long term plan? Do we wait a few releases and turn it back on? Since the API is exactly the same version after openedx/edx-platform#33006 the only way to know for sure that the email worked would be to call the API and then look at the answer, but by then the incorrect enrollment would already have been created. I'm good with merging this changes as is, but I still wanted to know the plans for the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said, were good to merge this to fix the bug
Yes, we could use email directly when Quince is the oldest Open edX support. I don't have a strong position regarding this, but we can discuss it and decide the best in terms of maintenance and usability. |
@MaferMazu 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
…
Description
When we add the new endpoint support in #44, we insert a bug. We tried to make an email enrollment, and in the previous version (Palm and Olive), this didn't fail, but we created an enrollment with the JWT token user, which is not the correct behavior.
To fix this, I only changed the second argument in get_enrollment_process_body to use the old form to request (with users). More info here.
Testing instructions
Install this plugin and perform enrollment requests in different versions of Open edX.
Check if you can enroll users and if you can perform course enrollments allowed.
Additional information
Without this change (The bug)
Screenshot of performing an enrollment with a user (Olmo version) - we perform this action with a user, and the plugin uses another user (the JWT token user).
With this change
Screenshot of performing an enrollment with a user (Olmo version)
Screenshot of performing an enrollment with a user (Quince version)
Screenshot of trying to enroll someone without an Open edX account without and with the enrollment allowed check, respectively (Quince version)
Checklist for Merge