- Add a new CourseEnrollmentCelebration model, which ties a
course enrollment to some booleans about progress celebrations
- Add serialization of the new model to the existing courseware_api
app's existing course info view
- Add new API in courseware_api to update a celebration model
This patch improves on the user locked
out logic by providing a helping message
near locked out. This would help reduce
retries by giving user the option to use
password reset flow to fix the issue.
PROD-1505
Add list of states and field to UserProfile model; add migration; add
state field to relevant serializers and to
ACCOUNT_VISIBILITY_CONFIGURATION. Removes state data if country is
changed to something other than United States.
Previously code was only showing banner for enterprise
learners. This patch would remove this restriction
and is available to all edX learners provided that
'enable_secondary_email_feature' is switched on.
PROD-1477
This was added in here as a shim to catch places that were still using
the old version of these models that had an attribute called course_id
instead of the `course` foreign key. After monitoring production for
two weeks, we can be pretty confident that we've caught most places that
do this. Removing this code since it should no longer be needed.
We don't use this field in edx-platform since we rely on UserProfile
instead. But we need to do this to prevent accidental incorrect use of
this field. Django adds a migration between 1.11 and 2.2 to increase
the length of this field that we are opting to skip. This change
enforces the old limit.
We now either pass in the relevant courseoverview or when creating the
enrollement we use the factory which automatically creates the relevant
CourseOverview object for testing purposes.
Historically, the CourseEnrollment model used to have a `course_id`
field. A lot of tests still call the factory using that. Instead of a
`course_id` field this model now has a `course` field which is a foreign
key to the CourseOverview model.
The factory still accepts the course_id but uses it to create the
relevant CourseOverview object where necessary. This commit fixes two
issues with the factory.
1. If the course id is passed in as`course_id` instead of `course__id`
then, the generated CourseOverview does not have the correct course_id.
2. Even though the CourseEnrollment model no longer needs the
`course_id` parameter, we were still passing it through. We now remove
it so that it is not passed through to the CourseEnrollment model
instantiation.
It conflicts with an underlying related field on that model which seems
to be getting at the same value from the related table.
Add logging for incorrectly instantiating CourseEnrollment models.
This is to catch any places that might break this that are outside of
edx-platform. Django won't accept `course` values that aren't
course_overviews so we don't need extra logic to test that `course`
values are of the correct type.
fixup! Remove the course_id property on student.CourseEnrollment.
1. Created a new celery queue with key `SOFTWARE_SECURE_VERIFICATION_ROUTING_KEY`.
2. Added a celery task with retry logic.
3. sorted imports with isort.
4. Changed deprecated `log.warn` => `log.warning`.
* Requiring at least one args in a mutually exclusive group to be set
bulk_change_enrollment requires one of agrs: org or course to be set
for it to function correctly.
* Creating new function to verify initial password hash
Starting with django 2.1, the function is_password_usable no longer checks whether encode
is a valid password created by a django hasher(hasher in PASSWORD_HASHERS setting)
Adding this function to create constant behavior as we upgrade django versions
Bulk unenroll command is not supporting unenrolling all the learners
from multiple courses.This PR will enhance this mgmt cmd so that
it can support un-enrollment of learners from multiple courses.
PROD-1347
* Reenabling this since the renames on the schedules table are completed
* Reverting regex change that caused migration to be generated for userprofile
* MICROBA-253 add phone number field api for coaching plugin
* Remove hardcoded value
* Requested changes
* Add logger to models_api.py for student
* Import model with underscore to prevent exporting
* Moved return outside of try/catch block
* Add docstring
* whitespace