[MICROBA-1011]
- Add data migration to remove the duplicate certificate allowlist entries before adding the new constraint to the CertificateWhitelist model.
- Add `unique_together` constraint to the CertificateWhitelist model. A learner should only have a single allowlist entry per course-run.
Because the available date update to the CourseOverview happens inside a
view's signal and we have atomic requests on, the read that was
happening inside the task happened *before* the write was commited to
the database. To avoid the unknown bugs that would come from disabling
atomic transactions for that view (since it's large), this passes the
date we want down through the signals and tasks so we can skip the DB
read at the end.
The Learning MFE had a bug where instructors selecting
'View As: Audit' would find themselves redirected to the
'Enroll Now' page. This was because the Courseware API,
which powers the MFE, checked courseware access *after*
setting up masquerading--so, instead of checking whether
the instructor had access to view the course, we checked
whether some arbitrary un-enrolled learner would have
access to the course (the answer is generally No).
We fix this by doing what the Legacy courseware index
does: calculate courseware access *before* setting up
masquerading.
TNL-7989
In https://github.com/edx/edx-platform/pull/25955 `HiddenDescriptor`
(which was a subclass of `RawDescriptor` with a custom `student_view()`)
was converted to an XBlock. It is used as the `default_class` by the
`CachingDescriptorSystem` classes. However `RawDescriptor` is still
being used by `XMLModuleStore`. This has been replaced by
`HiddenDescriptor` as well.
The Studio UI prevents you from creating a Section or Subsection
with no title (display_name). But OLX import allows you to bypass
these checks and create Sections ("chapter" tag) and Subsections
("sequential" tag) without display_name information specified in
the XML. When this happens, Studio and the LMS fall back to using
the url_name (the last part of the UsageKey) as a title, using the
display_name_with_default method.
This usually works, because url_names are derived from the import
file name, and if you're hand-editing a course in XML, your file
names are probably more intelligible than Mongo object IDs. In any
case, this commit updates get_outline_from_modulestore to match the
behavior of Studio and the LMS with respect to this situation.
This is part of the course outlines backfill rollout. TNL-8056
Reverts #26731
The code in common/lib/capa/capa/safe_exec needs
to remain Python 3.5-compatible, since edx-sandbox
(ie codejail) is still running Python 3.5.