* Added a pylint plugin to set django settings module according to the module on which pylint is ran
* Fix quality
Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
The render_xblock view, which powers the Learning
MFE (among other things) returned a 404 when un-
enrolled course staff users tried to load it while
masquerading as learners. This was because we
checked course access after enabling the
masquerading context, which triggered a redirect-
to-enrollment exception.
The fix is simply to enable the masquerading
context after checking course access.
Content-level behavior and access is still
calculated within the masquerading context,
as intended.
TNL-7989
tests are failings and complaining related objects doest not exists in
User table. Create object in test setup to fix it.
In another fix article id was giving integrity error.
Fixing task test.
tests are failings and complaining related objects doest not exists in User table. Create object in test setup to fix it.
In another fix article id was giving integrity error.
Fixing task test.
Exposed the Date header so clients can accurately compute times relative to the dates returned by the API; browser time is notoriously unreliable for this, especially for a Learner-facing countdown call-to-action based on the access expiration date. (REV-2126)
Using the Date header for this allows the client to make use of information that is already sent, does not require additional calls nor modifying the API, and could be generalized to more or all our APIs without modifying them.
[MICROBA-1011]
- When creating bulk allowlist entries make the tool use the `is_on_allowlist` certificate API function over accessing the CertificateWhitelist model methods directly
- When creating bulk allowlist entries make the tool use the `create_or_update_allowlist_entry` certificate API function over using CertificateWhitelist model/Django ORM directly
Allowing it to do so left us prone to error when an explicit enterprise_customer_uuid arg is provided.
We should modify this command in the future to perform deletions of open assignments as its only action,
and it should only be invoked this way after we have verified that all
backfilled enterprise_customer fields on the assignments have been set correctly.
enterprise version 3.18.4
A "section" tag in an OLX upload used to map to the
SemanticSectionDescriptor, which translated it into a Sequence
("sequential" tag). This is both obscure and confusing, since it uses
language that predates Studio. Back in the LMS prototype days,
"section" was inconsistently used to be interchangeable with "sequence"
and "sequential", and what Studio today calls a "section" was called a
"chapter". Bits of this legacy terminology are still around in the
courseware rendering code.
The upshot is that if you make an OLX tag "section" before this commit,
it would not map to what we call a "Section" in all our documentation,
but to a "Subsection"; furthermore, if that <section> only had one child
element, the node would be replaced with its singular child, removing
the <section> node from the course tree entirely.
The fact that you can make a "section" OLX tag
at all is nowhere in our documentation because courses haven't been
written that way since late 2011 or early 2012.
SemanticSectionDescriptor came up as part of the XModule ->
XBlock conversion efforts as a legacy XModule that isn't worth
converting. With the removal of this class, all XBlocks
in edx-platform are "pure" XBlocks, ending our reliance
on the XModule-to-XBlock shimming infrastructure.
This commit also removes the process_includes decorator, which was only
used for "section" tags. This does NOT delete the ProblemBlock-specific
<include> tag, which is still supported (if obscure).
There is a chance that through tribal knowledge or copy-paste, some
section tags survive in the wild of old edX courses. It's difficult for
us to assess because by its nature, this tag doesn't just say
"section", but instead actually does the mutation on import so it's
stored as "sequential" in the modulestore–therefore things like
CourseGraph can't detect it.
The fix for any such XML-authored courses is:
* For instances of <section> that wrap a single child node,
replace the <section> node in favor of its child node.
* For instances of <section> that wrap a sequence of children,
substitute <section> with <sequential>
Note that "<section>" is a valid HTML tag
type and so may show up in any component that can contain HTML and is
unrelated to the course structure OLX tag alias "<section>" that this
commit removes.
DEPR-124
* Introduces the idea of content errors into the learning_sequences
public API, accessible using get_content_errors().
* Makes course outline generation much more resilient to unusual
structures (e.g. Section -> Unit with no Sequence in between),
with the understanding that anything that doesn't conform to the
standard structure will simply be skipped.
* Improves the Django Admin for learning_sequences to display
content errors and improve sequence data browsing within a course.
* Switches the main table viewed in the Django admin from
LearningContext to CourseContext, which is appropriate since only
course runs generate outlines.
This was done as part of TNL-8057, with the end goal of making
course outline generation resilient enough to switch over apps
to using the learning_sequences outline API. The types of course
structure errors that this PR addresses cause display issues even
in the current Outline Page experience, but would break the outline
generation for learning_sequences altogether.
The approach for error messages here is very generic, to keep
modulestore concepts from seeping into learning_sequences (which is
not aware of the modulestore/contentstore). We may need to address
this later, with a more normalized content error data model.
While the Django admin page is backwards compatible with the old
versions of the models, we should run the backfill_course_outlines
management command after deploying this change, to get the full
benefits.
* fix: six was being used without being imported
Removed usage of the python library six from module. This is fixing an error where the python library six is used in a module without being imported. Multiple PRs merging around same time caused this conflict.