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
We sometimes update preexisting SAML SSO providers to configure them
to automatically create SSO identity verification (IdV) records when a
learner links an account via that provider. Turning that configuration
from off to on does make it such that when learners log back in via
their linked account, a new IdV record will be created for them. But
it's possible we'd want this process to happen more automatically and
seamlessly, for which this management command will be helpful.
Note that this does not help with removing SSO verification records
for a provider for which this configuration has been turned off.
JIRA:EDUCATOR-4947