-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #808 from edx/bseverino/onboarding-enrollment-mode
[MST-683] Add enrollment mode to onboarding status view
- Loading branch information
Showing
10 changed files
with
91 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -709,15 +709,19 @@ def setUp(self): | |
self.learner_2 = User(username='user2', email='[email protected]') | ||
self.learner_2.save() | ||
|
||
self.enrollment_modes = ['verified', 'masters', 'executive-education'] | ||
enrollments = [ | ||
{ | ||
'user': self.user, | ||
'mode': self.enrollment_modes[0], | ||
}, | ||
{ | ||
'user': self.learner_1, | ||
'mode': self.enrollment_modes[1], | ||
}, | ||
{ | ||
'user': self.learner_2, | ||
'mode': self.enrollment_modes[2], | ||
}, | ||
] | ||
set_runtime_service('enrollments', MockEnrollmentsService(enrollments)) | ||
|
@@ -778,16 +782,19 @@ def test_multiple_onboarding_exams(self): | |
'results': [ | ||
{ | ||
'username': self.user.username, | ||
'enrollment_mode': self.enrollment_modes[0], | ||
'status': InstructorDashboardOnboardingAttemptStatus.submitted, | ||
'modified': serialized_onboarding_attempt['modified'] if serialized_onboarding_attempt else None, | ||
}, | ||
{ | ||
'username': self.learner_1.username, | ||
'enrollment_mode': self.enrollment_modes[1], | ||
'status': InstructorDashboardOnboardingAttemptStatus.not_started, | ||
'modified': None, | ||
}, | ||
{ | ||
'username': self.learner_2.username, | ||
'enrollment_mode': self.enrollment_modes[2], | ||
'status': InstructorDashboardOnboardingAttemptStatus.not_started, | ||
'modified': None, | ||
} | ||
|
@@ -891,13 +898,15 @@ def test_one_status_filter(self): | |
'results': [ | ||
{ | ||
'username': self.user.username, | ||
'enrollment_mode': self.enrollment_modes[0], | ||
'status': InstructorDashboardOnboardingAttemptStatus.setup_started, | ||
'modified': (first_serialized_onboarding_attempt['modified'] | ||
if first_serialized_onboarding_attempt else None | ||
) | ||
}, | ||
{ | ||
'username': self.learner_1.username, | ||
'enrollment_mode': self.enrollment_modes[1], | ||
'status': InstructorDashboardOnboardingAttemptStatus.setup_started, | ||
'modified': (second_serialized_onboarding_attempt['modified'] | ||
if second_serialized_onboarding_attempt else None | ||
|
@@ -940,13 +949,15 @@ def test_multiple_status_filters(self): | |
'results': [ | ||
{ | ||
'username': self.user.username, | ||
'enrollment_mode': self.enrollment_modes[0], | ||
'status': InstructorDashboardOnboardingAttemptStatus.setup_started, | ||
'modified': (first_serialized_onboarding_attempt['modified'] | ||
if first_serialized_onboarding_attempt else None | ||
) | ||
}, | ||
{ | ||
'username': self.learner_1.username, | ||
'enrollment_mode': self.enrollment_modes[1], | ||
'status': InstructorDashboardOnboardingAttemptStatus.verified, | ||
'modified': (second_serialized_onboarding_attempt['modified'] | ||
if second_serialized_onboarding_attempt else None | ||
|
@@ -998,16 +1009,19 @@ def test_returns_correct_onboarding_status(self, attempt_status, expected_onboar | |
'results': [ | ||
{ | ||
'username': self.user.username, | ||
'enrollment_mode': self.enrollment_modes[0], | ||
'status': expected_onboarding_status, | ||
'modified': serialized_onboarding_attempt['modified'] if serialized_onboarding_attempt else None, | ||
}, | ||
{ | ||
'username': self.learner_1.username, | ||
'enrollment_mode': self.enrollment_modes[1], | ||
'status': InstructorDashboardOnboardingAttemptStatus.not_started, | ||
'modified': None, | ||
}, | ||
{ | ||
'username': self.learner_2.username, | ||
'enrollment_mode': self.enrollment_modes[2], | ||
'status': InstructorDashboardOnboardingAttemptStatus.not_started, | ||
'modified': None, | ||
}, | ||
|
@@ -1073,16 +1087,19 @@ def test_multiple_exam_attempts(self): | |
'results': [ | ||
{ | ||
'username': self.user.username, | ||
'enrollment_mode': self.enrollment_modes[0], | ||
'status': InstructorDashboardOnboardingAttemptStatus.setup_started, | ||
'modified': serialized_onboarding_attempt['modified'] if serialized_onboarding_attempt else None, | ||
}, | ||
{ | ||
'username': self.learner_1.username, | ||
'enrollment_mode': self.enrollment_modes[1], | ||
'status': InstructorDashboardOnboardingAttemptStatus.not_started, | ||
'modified': None, | ||
}, | ||
{ | ||
'username': self.learner_2.username, | ||
'enrollment_mode': self.enrollment_modes[2], | ||
'status': InstructorDashboardOnboardingAttemptStatus.not_started, | ||
'modified': None, | ||
}, | ||
|
@@ -1164,16 +1181,19 @@ def test_other_course_verified(self): | |
'results': [ | ||
{ | ||
'username': self.user.username, | ||
'enrollment_mode': self.enrollment_modes[0], | ||
'status': InstructorDashboardOnboardingAttemptStatus.not_started, | ||
'modified': None, | ||
}, | ||
{ | ||
'username': self.learner_1.username, | ||
'enrollment_mode': self.enrollment_modes[1], | ||
'status': InstructorDashboardOnboardingAttemptStatus.other_course_approved, | ||
'modified': serialized_onboarding_attempt_1.get('modified'), | ||
}, | ||
{ | ||
'username': self.learner_2.username, | ||
'enrollment_mode': self.enrollment_modes[2], | ||
'status': InstructorDashboardOnboardingAttemptStatus.setup_started, | ||
'modified': serialized_onboarding_attempt_2.get('modified'), | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.