Commit Graph

58450 Commits

Author SHA1 Message Date
Michael Terry
6f7e6bca87 Merge pull request #27023 from edx/mikix/forum-transactional
feat: mark forum response notifications transactional
2021-03-16 09:23:55 -04:00
Michael Terry
a7b75e5014 feat: mark forum response notifications transactional
The user opts into them when making a post / through the forums UI.
They are not truly a marketing email or similar.
2021-03-16 08:50:40 -04:00
Awais Qureshi
2e9bb7b961 Merge pull request #26954 from edx/learner-profile
pyupgrade in leaner-profile, lti-course-tab, personalized-learner
2021-03-16 17:33:17 +05:00
Matt Tuchfarber
30d59f2fcc Merge pull request #26991 from edx/tuchfarber/fix_transaction_bug
feat: Pass date in cert date update signal
2021-03-16 08:01:27 -04:00
Jawayria
ac74263098 BOM-2408: Removed unused imports from openedx/core/djangoapps/content 2021-03-16 16:39:04 +05:00
Awais Qureshi
b68566cbed Merge pull request #26951 from edx/pyupgrade-course_search
pyupgrade in course-search and discount.
2021-03-16 16:18:05 +05:00
Awais Qureshi
8ee4bd2f92 Merge pull request #26887 from edx/BOM-2442
pyupgrade in announcements.
2021-03-16 15:26:38 +05:00
Usama Sadiq
55661b441d refactor: ran pyupgrade on openedx/core/djangoapps/credit (#26848) 2021-03-16 15:16:31 +05:00
Usama Sadiq
369885002d refactor: ran pyupgrade on openedx apps (#26846)
Ran pyupgrade on openedx/core/djangoapps/{coursegraph, courseware_api, crawlers}
2021-03-16 15:15:35 +05:00
M. Zulqarnain
0ca2295e8f refactor: pyupgrade in passowrd_policy (#26950) 2021-03-16 14:37:15 +05:00
M. Zulqarnain
dfe6f21e4a refactor: pyupgrade in monkey_patch, oauth_dispatch, olx_rest_api (#26917) 2021-03-16 14:37:08 +05:00
Usama Sadiq
cf10b29a3e refactor: ran pyupgrade on openedx/core/djangoapps/dark_lang (#26849) 2021-03-16 14:30:46 +05:00
Awais Qureshi
52a92d2b40 Pyupgrade in announcements. 2021-03-16 14:21:46 +05:00
M. Zulqarnain
c8902bed58 refactor: pyupgrade in heartbeat, lang_pref, models (#26916) 2021-03-16 14:15:01 +05:00
M. Zulqarnain
e9239e5972 refactor: pyupgrade in common_views, config_model_utils (#26915) 2021-03-16 14:14:46 +05:00
edX requirements bot
3decc70c47 Updating Python Requirements (#27019) 2021-03-16 14:11:32 +05:00
edX cache uploader bot
e13f0c0a96 Updating Bokchoy testing database cache (#27008) 2021-03-16 13:05:37 +05:00
Muhammad Soban Javed
a361cbdbe9 Added a pylint plugin to set django settings module (#26938)
* 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>
2021-03-16 12:53:02 +05:00
Awais Qureshi
26ff8b2bb9 Merge pull request #27002 from edx/fixing-test
BOM-2453
2021-03-16 12:08:29 +05:00
Carla Duarte
a7b960bb54 Merge pull request #27016 from edx/ciduarte/AA-212
AA-212: add masquerade test for progress tab
2021-03-15 16:57:49 -04:00
Kyle McCormick
1f392bdc3e fix: render_xblock was denying access to staff masquerading as learners (#27017)
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
2021-03-15 16:50:33 -04:00
Carla Duarte
dbe31e3c48 AA-212: add masquerade test for progress tab 2021-03-15 16:35:30 -04:00
Awais Qureshi
9de74b1b13 BOM-2453
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.
2021-03-16 01:15:48 +05:00
Michael Terry
c79a640117 Merge pull request #27014 from edx/mikix/double-message
fix: don't duplicate text in forum notification email
2021-03-15 16:06:03 -04:00
Michael Terry
4aacedc604 fix: don't duplicate text in forum notification email 2021-03-15 15:29:01 -04:00
Awais Qureshi
863a70c6fa BOM-2453
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.
2021-03-15 23:47:57 +05:00
Ben Holt
e93f035876 feat: exposed 'Date' header so clients can compute accurate relative time (#26979) REV-2126
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.
2021-03-15 14:43:00 -04:00
Justin Hynes
24ac0e627f Merge pull request #27010 from edx/jhynes/microba-1011_cleanup
MICROBA-1011 | Reduce use of certs models directly in instructor dashboard app
2021-03-15 13:27:34 -04:00
Michael Terry
47e4991af0 Merge pull request #27009 from edx/mikix/ace-bump
fix: bump edx-ace to 1.0.1 to fix braze email styling
2021-03-15 12:52:29 -04:00
Justin Hynes
0b22c70248 MICROBA-1011 | Reduce use of Certificates models accessed directly in Instructor Dashboard djangoapp
[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
2021-03-15 12:00:56 -04:00
edX cache uploader bot
d16241a8d5 Updating Bokchoy testing database cache (#27007) 2021-03-15 19:59:03 +05:00
Matthew Piatetsky
7ec8e0e327 Merge pull request #26988 from edx/AA-461
[AA-461] Add management command to export course metadata for all courses
2021-03-15 10:57:59 -04:00
Michael Terry
dda3591b06 fix: bump edx-ace to 1.0.1 to fix braze email styling 2021-03-15 10:49:48 -04:00
Alex Dusenbery
854015d18e fix: The update_role_assignments_with_customers command no longer deletes open assignments.
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
2021-03-15 10:13:52 -04:00
David Ormsbee
51811f0c5e Merge pull request #26987 from edx/ormsbee/tnl-8057-malformed-structures
Improved error handling in Course Outline generation.
2021-03-15 10:11:57 -04:00
M. Zulqarnain
8ec2699269 refactor: pyupgrade in openedx ccxcon and certificates (#26852) 2021-03-15 18:30:06 +05:00
M. Zulqarnain
94f14c6b3d refactor: pyupgrade on bookmarks, cache_tools, catalog (#26783) 2021-03-15 18:29:40 +05:00
Justin Hynes
f00f562deb Merge pull request #26989 from edx/jhynes/microba-1011_allowlist-uniqueness
MICROBA-1011 | Remove duplicate allowlist entries and add constraint preventing future occurrences
2021-03-15 09:15:20 -04:00
Usama Sadiq
7108562c87 refactor: ran pyupgrade on openedx/core/djangoapps/credentials (#26847) 2021-03-15 18:09:56 +05:00
Kyle McCormick
8813a61da2 feat!: remove SemanticSectionDescriptor, the final XModule (#26990)
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
2021-03-15 09:04:23 -04:00
Arslan Ashraf
8163d8c772 docs: add annotations for DISABLE_COURSE_CREATION feature flag (#26941) 2021-03-15 08:59:39 -04:00
Azan Bin Zahid
a9a92a3c39 Merge pull request #27001 from edx/azan/PROD-2298
disable xsslint
2021-03-15 16:15:32 +05:00
Azan Bin Zahid
c20f938072 disable xsslint 2021-03-15 15:25:41 +05:00
edX requirements bot
a6528c69d8 Updating Python Requirements (#26997) 2021-03-15 12:10:55 +05:00
David Ormsbee
3a552c4fdf feat: Outline error handling and admin improvements.
* 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.
2021-03-15 01:31:36 -04:00
David Ormsbee
36ebb3e124 feat: Add --force option to backfill_course_outlines.
Adding new functionality is going to require running this command
on all courses, not just ones that have it missing.
2021-03-15 01:31:36 -04:00
Manjinder Singh
5b54537c3a fix: six was being used without being imported (#26993)
* 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.
2021-03-12 16:41:48 -05:00
Kyle McCormick
378ebe54a7 Merge pull request #26992 from edx/ciduarte/fix
replace six with str
2021-03-12 16:28:40 -05:00
Carla Duarte
f50b71b03c replace six with str 2021-03-12 15:32:05 -05:00
Matt Tuchfarber
a82489db8e fix tests 2021-03-12 14:59:44 -05:00