-
Notifications
You must be signed in to change notification settings - Fork 4.3k
MST-181: Add the ability to sync Program Enrollment Linkage with SSO'd edX account #23873
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -382,15 +382,15 @@ def enroll_in_masters_track(user, course_key, status): | |
| Arguments: | ||
| user (User) | ||
| course_key (CourseKey|str) | ||
| status (str): from ProgramCourseEnrollmenStatuses | ||
| status (str): from ProgramCourseEnrollmentStatuses | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just fixing a typo I noticed. |
||
|
|
||
| Returns: CourseEnrollment | ||
|
|
||
| Raises: NonExistentCourseError | ||
| """ | ||
| _ensure_course_exists(course_key, user.id) | ||
| if status not in ProgramCourseEnrollmentStatuses.__ALL__: | ||
| raise ValueError("invalid ProgramCourseEnrollmenStatus: {}".format(status)) | ||
| raise ValueError("invalid ProgramCourseEnrollmentStatus: {}".format(status)) | ||
| if CourseEnrollment.is_enrolled(user, course_key): | ||
| course_enrollment = CourseEnrollment.objects.get( | ||
| user=user, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,11 +105,6 @@ class Meta(object): | |
|
|
||
| # For each program enrollment, there may be only one | ||
| # waiting program-course enrollment per course key. | ||
| # This same constraint is implicitly enforced for | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't believe this is true anymore, since this is now a
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are correct here. |
||
| # completed program-course enrollments by the | ||
| # OneToOneField on `course_enrollment`, which mandates that | ||
| # there may be at most one program-course enrollment per | ||
| # (user, course) pair. | ||
| unique_together = ( | ||
| ('program_enrollment', 'course_key'), | ||
| ) | ||
|
|
||
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.
TODO: I will create a ticket to include logic around handling the transference of
course_staffroles.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.
See MST-238.