Commit Graph

9450 Commits

Author SHA1 Message Date
Awais Jibran
e05d4a9c47 Monitor error in NR when OLX validation fails. (#27381) 2021-04-21 11:56:54 +05:00
Usama Sadiq
ab41a7daee refactor: Apply lint-amnesty on pylint violations 2021-04-20 21:43:59 +05:00
Awais Jibran
62c8805e3e Refactor + Tests: Course Import Feature (#27369)
* Code Refactoring
This PR bumps code coverage by adding unit tests & clean up some code for improving code quality and maintainability.
2021-04-19 23:49:42 +05:00
Felipe Montoya
313eef2fad Merge pull request #27339 from eduNEXT/lmm/fix_server_error_page
fix: Import missing function in server_error template.
2021-04-16 12:45:00 -05:00
Awais Jibran
9722e37492 Enable Course Olx Validation during Course Import (#27300)
* Enable import failure and email with Errors/Warnings

This PR enables course import failure in case of olx validation errors. Here is the flow.
  * Course Import tries to import foo.tar.gz into their course shell
  * Course olx contains validation errors
  * During course import, olx is validated and import is failed with the error message "Course olx validation failed. Please check your email."
  * System generates an email with ERRORs & WARNINGs in the body of the email.

This PR also adds a waffle flag contentstore.bypass_olx_failure. The purpose of this test flag is to allow course teams to unblock by enabling them to bypass the
the olx-validation failure.
The workaround is shared on the ticket TNL8214.

* Disable olx validation out of the box.
2021-04-16 18:45:59 +05:00
Awais Jibran
8acb45f687 Fix index bug in the email (#27353)
* Fix indexing bug in the email.
2021-04-16 11:04:28 +05:00
Régis Behmo
e58ad6c809 fix: extra ")}" in 500 error page
The 500 page included ugly ")}" characters.
2021-04-15 17:40:46 -04:00
Ahtisham Shahid
71beccc12c Updated User task email (#27346) 2021-04-15 22:38:47 +05:00
Ahtisham Shahid
58231c4262 Moved Import error messages to single place (#27331) 2021-04-15 12:25:04 +05:00
Luis Moreno
275d9f077e fix: Import missing function in server_error template. 2021-04-14 11:54:05 -04:00
Julia Eskew
7dbad0bd9a learning_sequence doc tweaks and new type annotation style (#27311)
* docs: Add a statement comment. Update learning sequences README.

* refactor: Add Python3.6+-style type annotations to attrs classes where possible.
2021-04-14 11:12:01 -04:00
stvn
22fb1ec124 refactor: Move InstructorFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
8869a30bcd refactor: Move UserFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
2fa36fb0cf refactor: Move StaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
5dd8302d8b refactor: Move GlobalStaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
43698fff0a refactor: Move get_course_by_id helper from LMS to core
This helper is used by the LMS, CMS, _and_ `openedx.core`,
so let's move it to `openedx.core` to reduce import complexity.

The following files no longer import from LMS:
- cms/djangoapps/contentstore/management/commands/edit_course_tabs.py
- lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py
- openedx/core/djangoapps/ccxcon/api.py
- openedx/core/djangoapps/verified_track_content/models.py
- openedx/features/course_experience/plugins.py

Note: The LTI XBlock has a dependency on this import path (!?);
a fix can be found here [1].

- [1] https://github.com/edx/xblock-lti-consumer/pull/154
2021-04-13 23:25:48 -07:00
Kyle McCormick
4531e15519 refactor!: stop using import_shims
Attempting to import packages from
lms/djangoapps, cms/djangoapps, or common/djangoapps
as if they are import roots will now
simply raise ImportErrors (like any other invalid
import) instead of DeprecatedEdxPlatformImportError.

See docs/decisions/0007-sys-path-modification-removal.rst
for more details.
2021-04-12 09:43:59 -04:00
Awais Jibran
30c80082c3 Use config settings for olxcleaner (#27294)
* Use config settings for olxcleaner

Use config settings instead of hardcoded values for olx validation. This would help in adding a great deal of control when you want to change these settings in the future. With this approch we would not need a redeploy.

* Use configs and deprecate waffleflag and also add / update tests
2021-04-12 16:27:42 +05:00
Uzair Rasheed
488069f0cf Merge pull request #27292 from edx/add-separate-ratelimit-var
Add independent ratelimit setting for forms
2021-04-10 14:46:53 +05:00
Feanil Patel
16e4aa3c62 chore: Remove decentralized devstack config.
We have decided not to pursue the decentralized devstack design right
now and so we want to cleanup files and task that were built as a part
of the process.

Related Ticket: ARCHBOM-1685
2021-04-09 15:50:03 -04:00
uzairr
1d5a95facb Add independent ratelimit setting for forms
Currently, login and registration forms and view to log the user in
are sharing same ratelimit settings which is causing too much noise
while rendering forms.This PR will introduce a separate
setting for logistration forms.

VAN-436
2021-04-09 21:10:08 +05:00
Saad Yousaf
b36c562887 Merge pull request #27287 from edx/saad/TNL-8051
[TNL-8051] - bump olxcleaner version with latest update.
2021-04-09 15:45:58 +05:00
Jawayria
f1bb1b9161 Merge pull request #26482 from edx/jawayria/bom-2350
BOM-2350: Removed unused imports from cms using 'unimport'
2021-04-09 12:56:57 +05:00
SaadYousaf
7242b5018a [TNL-8051] - bump olxcleaner version with latest update. 2021-04-08 23:46:50 +05:00
HamzaIbnFarooq
582c02afc4 feat!: remove sysadmin dashboard feature w.r.t 0002-deprecate-sysadmin-dashboard-adr.rst
The sysadmin dashboard feature is converted into a plugable app named edx-sysadmin (https://github.com/mitodl/edx-sysadmin) according to the decisison made at https://github.com/edx/edx-platform/blob/master/lms/djangoapps/dashboard/decisions/0002-deprecate-sysadmin-dashboard-adr.rst. Instances using sysadmin dashboard should use the new plugin from now onwards.

BREAKING CHANGE: sysadmin dashboard is removed
2021-04-08 09:15:11 -04:00
Awais Jibran
1d39e431e3 Use allowed_xblocks settings (#27265)
* Use allowed_xblocks in olxcleaner validate.
2021-04-07 15:45:04 +05:00
Ahtisham Shahid
f3a62b5f89 Error message for proctor exam show to user (#27238)
* Error message for proctor exam visible to user

* Created exception class for Invalid Proctor settings
2021-04-07 10:46:19 +05:00
Jawayria
772f8cbe90 refactor: Removed unused imports
Removed unused imports from cms using 'unimport'
2021-04-06 17:47:48 +05:00
Robert Raposa
96be45f1bd Merge pull request #27222 from edx/robrap/ARCHBOM-1721-toggle-doc-cleanup
ARCHBOM-1721: docs: update toggle docs
2021-04-05 10:47:55 -04:00
David Ormsbee
d2389fb7fb fix: Don't break export when transcript is Latin-1 encoded.
Video SJSON transcripts are supposed to be UTF-8 encoded, but SJSON
is an ad hoc thing we made up to make it easier to build the
transcripts viewer in the VideoBlock, and it's not well specified.
Prior to this commit, if you had an SJSON file with Latin-1 encoded
text outside the standard ASCII range (e.g. û), then we'd error out
while trying to export it.

This was blocking an effort to export some Old Mongo courses (TNL-8007).
2021-04-02 13:33:16 -04:00
Awais Jibran
2641336fc1 Update error message (#27232) 2021-04-02 22:05:59 +05:00
Nathan Sprenkle
c97932fa99 fix: add missing protocol to web link for assets (#27220)
* fix: add missing protocol to web link for assets

* test: fix asset path test

* refactor: update asset web URL to use urljoin
2021-04-02 11:13:57 -04:00
AsadAzam
c4da6c1fe4 Display import errors to user (#27147)
* Display import errors to user

* Refactored

* Refactored

* Refactored

* Fixed quality

* Fixed quality

* Refactored code

* Fixed message

* Refactored code
2021-04-02 18:53:39 +05:00
Awais Jibran
8023bbc1af Log Errors + Warnings. (#27210) 2021-04-02 16:02:46 +05:00
Robert Raposa
8ef8b35a54 docs: update toggle docs
A variety of updates were made to improve the toggle documentation:
* Added comments to help ensure that the waffle(), waffle_switches(),
  waffle_flags() anti-pattern won't be contagious (copied).
* Some minor toggle_description updates.
* Removed empty toggle_target_removal_date annotations for
  non-temporary toggles.
* Removed empty optional toggle_warnings annotations.
* Removed empty optional toggle_tickets annotations.
* Removed deprecated toggle_category, toggle_status,
  and toggle_expiration_date annotations.
* Fixed some indents, use cases, and implementations.

ARCHBOM-1721
2021-04-01 21:58:29 -04:00
Awais Jibran
f898fc5d72 Short circuit, library import. (#27195) 2021-04-01 12:29:57 +05:00
Awais Jibran
ad7f6019fe Integrate "olxcleaner" with course import (#27164)
* Integrating olxcleaner in course import

* Adding toggle removal date and addressing pylint issues.
2021-03-31 13:26:14 +05:00
alangsto
736e399cde MST-643 prevent errors for escalation email if proctoring is disabled (#27166) 2021-03-30 08:33:48 -04:00
Zainab Amir
8cc5f13daf Add rate limit to registration endpoint (#27060)
Currently the registration endpoint has no rate limit. Added a new ratelimit
variable to support the change, it's value is set to 60/7d.

VAN-302
2021-03-25 16:28:30 +05:00
AsadAzam
9bf96765cc display error during import upload (#27128) 2021-03-25 12:54:18 +05:00
Jansen Kantor
2379f1ca26 fix: Stop rendering Visibility and Move buttons on libraries 2
* Revert "Revert "fix: Stop rendering Visibility and Move buttons on libraries (#26885)" (#27113)"

This reverts commit 23443c4376.

* fix: change method of accessing course id
2021-03-24 11:07:43 -04:00
Awais Jibran
49296005db Adding some minor changes to logs (#27127) 2021-03-24 17:25:04 +05:00
Sarina Canelake
e802614634 Merge pull request #27119 from edx/sarina/TNL-8138
fix: Add ‘ENABLE_HELP_LINK’ to Studio settings
2021-03-24 08:12:01 -04:00
sarina
51ccf48f1c fix: Add ‘ENABLE_HELP_LINK’ to Studio settings
Fixes an issue where the button that linked to edX documentation for
course teams in Studio that displayed beside the logged-in user's username/
drop-down menu is gone. Regression from PR #26106

Ref: TNL-8138
2021-03-23 16:16:21 -04:00
Raul Gallegos
130b9f7bb3 fix: contentstore next section navigation (#27112)
Fixes bug introduced by #25965 (commit dd96a2) pointed out in:

  https://github.com/edx/edx-platform/commit/dd96a2#r48570091

The next button redirect at the top of the sequence in Studio's Unit editing view
was not going to the correct location.
2021-03-23 11:49:33 -04:00
Jansen Kantor
23443c4376 Revert "fix: Stop rendering Visibility and Move buttons on libraries (#26885)" (#27113)
This reverts commit 777bb633c5.
2021-03-23 11:35:14 -04:00
Daniel Francis
777bb633c5 fix: Stop rendering Visibility and Move buttons on libraries (#26885)
We're fixing an error that appears when you click the "edit access"
button on an XBlock in the library page.

Libraries in the "Add library" page shouldn't have the accessibility
config icon. Access settings for libraries are changed at the top, on
Settings > User Access. When clicking the access-button (the cog) on a
Library, an error appears. This is known to happen on koa.master and
open-release/juniper.3.

This happens due to the way XBlocks are rendered; as they get rendered
initially, the previews are unaware of whether they're part of a
library. We can confirm this by refreshing the page, this makes the
button disappear.

This fix removes the cogwheel when the XBlock is part of a library.
This doesn't affect the XBlocks imported to courses because those are
rendered on a Randomized Content XBlock, which does have its access
options.

Authored by: Daniel Francis <daniel.francis@opencraft.com>
2021-03-22 13:39:09 -04:00
Awais Jibran
5f773d326d Add missing import logs. (#27066) 2021-03-22 15:28:13 +05:00
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
Shimul Chowdhury
e942f12adc Add missing context platform_name and contact_mailing_address. And pass
site configuration to email context.
2021-03-19 10:05:49 +06:00