Before this commit, we had to do a separate query for every course a
user was enrolled in when determining whether a course was refundable
(if you have a certificate, it isn't). Now the student dashboard will
make a one-time query to grab all of a user's cert-issued courses. This
is indexed, so it should be much faster than grabbing each one
separately.
Pre-load the course overviews attached to CourseEnrollments on the
Student Dashboard, if possible. This will only grab the CourseOverviews
that already exist, and will not generate new ones. Any missing
CourseOverviews fall back to the lazily-created one-at-a-time behavior
they've always had. That's mostly because I wanted to optimize for the
common case in the least invasive way possible, and I don't want to get
caught up in locking issues.
Modify CourseEnrollment.enrollments_for_user to select the related user
object. This saves us from a bunch of redundant queries on the student
dashboard.
We should not be using custom signing keys for each service at this time. We may want to return to this strategy in the future; but, this is not the direction any of our other services are going in.
ECOM-6541
2. Add site configuration overrides to theming/helpers.py
3. Move microsite.get_value from theming/helpers to site_configuration/helpers
4. Move microsite_configuration.microsite.get_value usages to site_configuration.helpers.values
The get_or_create function is vulnerable to race conditions in MySQL, which can
cause the model LoginFailure to, in some cases, have more than one row for the
same user, breaking the login for that user.
Addinf functionality to expect and clean the error by deleting extra rows (by
oldest lockout date), leaving just one entry and allowing the user to login.
Replayed and squashed by @efischer19, initially commited by @laq
Allows support staff or global staff to view a list of a learner's
enrollments, and change enrollment modes. We generate a
ManualEnrollmentAudit record for these enrollment changes in order to
track updates. Additionally, enrollment changes are handled through
the enrollment API, which handles bookkeeping such as granting refunds
where appropriate.
ECOM-2825