Commit Graph

9297 Commits

Author SHA1 Message Date
David Ormsbee
4fde69441c Fix build: use @shared_task for update_outline_from_modulestore_task (#26216)
Update to make update_outline_from_modulestore_task use @shared_task
and @set_code_owner_attribute.
2021-01-28 11:22:39 -05:00
David Ormsbee
5353324c80 Merge pull request #26145 from edx/ormsbee/course-outline-publish-tnl-7733
Push Course Outlines to learning_sequences on publish.
2021-01-28 10:21:11 -05:00
David Ormsbee
669677c78a Push Course Outlines to learning_sequences on publish.
The learning_sequences app has its own model for Course Outlines.
Prior to this commit, these course outlines were only populated by
a management command in the learning_sequences app that queried
modulestore. This commit does a few things:

1. Move the update_course_outline command to live in contentstore
   (i.e. Studio). This makes learning_sequences unaware of
   modulestore, and makes it easier for us to extract it from
   edx-platform (or to plug in different kinds of course outlines).
2. Add tests.
3. Add performance and debug logging to course outline creation.
4. Make course outline creation happen every time a course publish
   happens.

This will allow us to start collecting data about how long building
course outlines takes, and get error reporting around any content
edge cases that break the course outline code.
2021-01-28 09:56:28 -05:00
Awais Jibran
ab60371009 Merge pull request #26187 from edx/aj/fix-studio-favicon
Update studio favicon
2021-01-28 12:39:02 +05:00
Muhammad Soban Javed
d26a59eb67 import task decorator from celery APP instance in CMS (#25953)
* import task decorator from celery APP instance instead of celery package in CMS

* replaced task decorator with shared_task in cms and common

* Fixed import of shared_task

* Fixed import
2021-01-27 18:35:11 +05:00
Awais Jibran
f4c0d63564 Update studio favicon 2021-01-27 15:02:18 +05:00
Robert Raposa
2d7a8358ef Merge pull request #26172 from regisb/regisb/fix-cms-annotation
[BD-21] Fix `ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS` code annotation
2021-01-26 13:09:30 -05:00
Régis Behmo
5f8a2952e9 Fix ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS code annotation
This annotation was causing a linting failure, and a TypeError down the road in
the feature toggle report processing step by
edx-toggles/scripts/feature_toggle_report.py.
2021-01-26 14:25:49 +01:00
Saad Yousaf
78adfc6c6c [TNL-7803] - Add text to new Edge logo (#26097)
* edge logo

* Refactored code

* Refactored code

Co-authored-by: Asad <asadazam93@gmail.com>
2021-01-26 14:14:54 +05:00
Régis Behmo
97399cf97c Fix TypeError during transcript upload to S3
On a platform that is configured to upload video transcripts to S3
(`DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"`),
uploads from the studio fail with a TypeError: "Unicode-objects must be
encoded before hashing"

A full stacktrace of the issue can be found here:
https://sentry.overhang.io/share/issue/2249b6f67d794c7e986cc288758f4ebe/

This error is triggered by md5 hashing in the botocore library, which
itself is used by the S3Boto3Storage storage class. This error does not
occur with filesystem-based uploads because it does not perform checksum
verification. The reason why this error would not occur on edx.org is
unknown. Similar issues were already fixed from edxval.

To address this issue, we encode the transcript file content prior to
sending it to s3.
2021-01-25 12:23:31 +01:00
Ahtisham Shahid
ed1156a690 Improved traces for new relic in CMS dashboard (#26126)
* Improved traces for new relic in cms dashboard
2021-01-25 14:15:54 +05:00
Kyle McCormick
44d5060c60 Add setting for error'ing on deprecated imports
Deprecated edx-platform import paths
(for example, `student` instead of
`common.djangoapps.student`) currently raise
warnings when used. We want to fully remove
support for those paths.

As an easily reversible way to initially remove
support, we add a new setting to LMS and Studio
called `ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS`,
defaulting to False. We set it to True for devstack
and will set it to True in Stage and Production
soon. If critical errors occur, we can easily
flip the setting back to False.
2021-01-21 10:49:47 -05:00
David Ormsbee
1d028c9baa Merge pull request #25572 from open-craft/raul/import-export-boto3-support
[SE-3530] Adds Boto3 support for Import/Export functionality
2021-01-19 13:08:04 -05:00
David Ormsbee
ea5194d967 Merge pull request #25537 from open-craft/shimulch/bb-3158
[MCKIN-26432] [BB-3158] Add Unit to breadcrumbs navigation
2021-01-19 13:07:45 -05:00
Ali Akbar
38e2a5242e Merge pull request #216 from edx/IM/security-fixes-7
Incident Management Security Fixes 7
2021-01-19 19:26:45 +05:00
Ahtisham Shahid
b03fb3f3fc Fixed size of lti component in studio (#26075) 2021-01-15 20:22:59 +05:00
Shimul Chowdhury
e339cc1b07 Add Unit & Nested blocks to breadcrumbs
hide links that has no url

Hide sequence nav in nested pages

Improve doc
2021-01-15 18:49:01 +06:00
stvn
7a599311c3 Merge PR #26050 debug/search/indexing
* Commits:
  Increase logging verbosity on update_search_index task
2021-01-13 11:52:09 -08:00
stvn
a40feee9c7 Increase logging verbosity on update_search_index task
to gain insight into CR-3119/TNL-7866.
We know that one or more errors are occuring during this job, but it's
not obvious what these errors are.
2021-01-13 10:04:08 -08:00
David Ormsbee
098e047fce Merge pull request #25987 from edx/ormsbee/tnl-7636-xblock-access
Check sequence-level gating in render_xblock (TNL-7636)
2021-01-13 09:35:56 -05:00
David Ormsbee
5a149f0fe3 Enable timed/special exams and pre-reqs in devstack.
These are common and useful enough features that it makes sense to
enable it for developers by default.
2021-01-12 11:30:58 -05:00
Nizar
1e872d4e10 Adds support for enabling custom tinymce plugins in Studio's HTML editor (#25695) 2021-01-11 11:28:20 -05:00
azanbinzahid
469dc71f6d PROD-2003 2021-01-11 14:32:50 +05:00
azanbinzahid
3f1985361c PROD-1996 2021-01-11 14:32:50 +05:00
azanbinzahid
6e56d6e63c PROD-1994 2021-01-11 14:32:50 +05:00
azanbinzahid
98561cbae1 PROD-1937 2021-01-11 14:32:50 +05:00
azanbinzahid
39c0d96b14 PROD-1936 2021-01-11 14:32:50 +05:00
azanbinzahid
73a7ce0416 PROD-1935 2021-01-11 14:32:50 +05:00
Usman Khalid
9e38b17202 Convert ErrorModule and NonStaffErrorModule to XBlocks. (#25570) 2021-01-07 10:51:33 -05:00
Kyle McCormick
7d2f8de03b Add type annotations to backfill_orgs_and_org_courses 2021-01-06 16:00:41 -05:00
Kyle McCormick
599d663779 Add option to backfill org data as inactive
Add an `--inactive` option to the
`bulk_add_orgs_and_org_courses` management
command, which causes the backfill to set
`active=False` on all rows created in the
Organization and OrganizationCourse tables.

This will lower the potential data
integrity risk to production systems
such as courses.edx.org.

Upgrade edx-organizations to 6.6.0

TNL-7774
2021-01-06 16:00:41 -05:00
Kyle McCormick
70f910935c Improve backfill_orgs_and_org_courses output formatting (#25880)
The output was previously surfaced via `log.info` calls.
Given that the command is reporting on thousands of records,
that ended up being very difficult to parse.
Instead, print one organization or org-course linkage
per line.

Add example run of command with output to command
class docstring.

TNL-7774
2021-01-06 13:23:19 -05:00
Peter Pinch
285ec771bf fix: Remove CAS settings (#25330)
part of DEPR-6
2021-01-06 08:15:35 -05:00
Usman Khalid
75391262da [BD-04] Convert SplitTest XModule to XBlock. (#25696) 2021-01-05 09:55:14 -05:00
stvn
39acbf2f21 Implement a new configuration system for discussions plugins
Additional details available in the attached decisions document.

Co-authored-by: Kshitij Sobti <kshitij@sobti.in>
Co-authored-by: stvn <stvn@mit.edu>
2020-12-17 18:23:46 -08:00
Robert Raposa
de16529ab6 Merge pull request #25885 from regisb/regisb/fix-deprecated-waffle-usage
[BD-21] Fix deprecated waffle usage
2020-12-17 12:41:40 -05:00
Ned Batchelder
3abd0e8e62 Update the Open edX logo urls (#25898)
The old URLs now serve the new logo, but at the old pixel size.  These
URLs serve the new logo at a natural pixel size.
2020-12-16 15:30:55 -05:00
Muhammad Soban Javed
bd601cf3a6 Update celery routing for celery 4+ (#25567)
* Update celery routing

- Used routing function instead of class
- Move task queues dictionary to Django settings
- Removed routing_key parameter
- Refactored routing for singleton celery instantiation

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2020-12-16 13:40:47 +05:00
Kyle McCormick
8b1162e6ae Clean up deprecated edx-platform imports of edxmako & util (#25684) 2020-12-15 09:04:03 -05:00
Régis Behmo
f29e415353 Fix deprecated usage of WaffleFlag.namespaced_flag_name
As of edx-toggles==1.2.0, the `WaffleFlag.namespaced_flag_name`
attribute is deprecated in favour of `WaffleFlag.name`.
2020-12-15 12:28:57 +01:00
Robert Raposa
1118f2d049 Merge pull request #25861 from edx/robrap/update-features-toggle-annotations
update FEATURES toggle annotation names
2020-12-11 13:01:27 -05:00
Robert Raposa
54044232b8 update FEATURES toggle annotation names
Update toggle_name annotations from "XXX"
to "FEATURES['XXX']" to match the name
used by the toggle state endpoint so they
don't seem like two different toggles.
2020-12-11 11:16:19 -05:00
Kyle McCormick
f5134e1201 Fix typo in backfill_orgs_and_org_courses dry-run call (#25859)
Also, add test to confirm fix of typo.

TNL-7774
2020-12-11 11:13:35 -05:00
Raul Gallegos
5279975483 [TNL-7771][LX-1409] sets blockstore values timeouts to avoid S3 links expiration (#25830) 2020-12-11 09:35:45 -05:00
Tim McCormack
0c57a02119 Enforce a Celery singleton across cms and lms by using shared module (#25840)
This should prevent the issues we've seen recently where cms modules are
imported by the running lms process, resulting in two celery instances
being created and tasks intermittently being registered to the wrong
instance (and therefore effectively lost.)

In commit ab6bf348d4/PR #25822 we tried to ensure that only one or the
other of the instances was created by adding a startup check.
Unfortunately, there's an external shared library that refers directly
to the lms celery, causing a startup failure in cms, so we had to revert
it. Rather than waiting to fix that library, this commit collapses
the two instances together so that there is only ever one.
2020-12-10 17:54:31 +00:00
Feanil Patel
68e4732590 Merge pull request #25829 from edx/feanil/enable_history_panel
Enable keeping some request history in the debug toolbar.
2020-12-10 11:28:17 -05:00
Tim McCormack
a9bcf22169 Revert "Only instantiate one celery app per process." 2020-12-10 14:14:42 +00:00
Feanil Patel
cdbbe077c2 Enable keeping some request history.
This makes it easire to debug things like POST requests that would
otherwise not be easily debugged during development.
2020-12-09 16:47:23 -05:00
Feanil Patel
ab6bf348d4 Only instantiate one celery app per process.
Ticket: BOM-2086

Currently there are parts of the LMS that import content from the CMS
APP and vice-versa.  When this happens, we end up with 2 instances of
the celery app and some tasks get registered to the wrong one. The
tasks that were getting registered to the wrong one are never able to
run and result in lots of production errors on celery workers.

The timing of the CMS celery app instantiation is non deterministic
so different tasks get lost depending on when it's imported by some
code in the LMS.

As long as SERVICE_VARIANT is set, this code should prevent the
instantiation of both celery apps.
2020-12-09 14:13:40 -05:00
Justin Lapierre
dfe15503ce Merge pull request #25012 from open-craft/farhaan/bb-2961-ora-button-support
[BB-2961] [BD-05] [TNL-7577] Added open response button to the component tray
2020-12-09 07:55:52 -05:00