MST-181: Add the ability to sync Program Enrollment Linkage with SSO'd edX account - #23873
Conversation
There was a problem hiding this comment.
TODO: I will create a ticket to include logic around handling the transference of course_staff roles.
There was a problem hiding this comment.
I'm just fixing a typo I noticed.
There was a problem hiding this comment.
I don't believe this is true anymore, since this is now a ForeignKey and not a OneToOneField. Please correct me if I am wrong.
There was a problem hiding this comment.
I think I'll change this to unlink_program_enrollment, since it operates on more than just the course enrollments now.
There was a problem hiding this comment.
Yeah, changing the function name to unlink_program_enrollment make sense.
|
jenkins run python |
2175dd6 to
d1ac943
Compare
schenedx
left a comment
There was a problem hiding this comment.
My comments are NIT. You can choose to ignore them.
The changes looks good to me.
There was a problem hiding this comment.
Yeah, changing the function name to unlink_program_enrollment make sense.
| # assert that all CourseAccessRoleAssignment objects are deleted | ||
| assert not active_enrollment_1.courseaccessroleassignment_set.all().exists() | ||
|
|
||
| def test_enrollment_already_linked_to_different_user(self): |
There was a problem hiding this comment.
The function name can be clearer with test_update_linking_enrollment_to_another_user
17347d9 to
6e99892
Compare
| Unlinks CourseEnrollments from the ProgramEnrollment by doing the following for | ||
| each ProgramCourseEnrollment associated with the Program Enrollment. | ||
| 1. unenrolling the corresponding user from the course | ||
| 2. moving the user into the audit track |
There was a problem hiding this comment.
This is laudable learner empathy; I definitely did not think about this & it's a great idea to do.
2e86388 to
4a99a2c
Compare
…of linking a learner to a ProgramEnrollment that is already linked to a different edX account. In this case, * unenroll the currently linked learner from the courses associated with related ProgramCourseEnrollments * for each course the is enrolled in as part of a ProgramCourseEnrollment, if the coures has an audit track, then move the enrollment into the audit track. Otherwise, keep the learner's enrollment in the existing track. * link the new user to the ProgramEnrollment * enroll the new user in the Master's track in the courses associated with related ProgramCourseEnrollments
4a99a2c to
38c255d
Compare
|
Your PR has finished running tests. There were no failures. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
MST-181
Enhance the Link Program Enrollments Support Tool to handle the case of linking a user to a ProgramEnrollment that is already linked to a different edX account.
In this case,