Commit Graph

9429 Commits

Author SHA1 Message Date
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
Awais Jibran
dd3a0bd939 Add missing import logs. (#27056) 2021-03-18 19:57:18 +05:00
AsadAzam
1593b40702 Improved logging for import (#27024)
* Improved logging for import

* Refactored code

* Refactored code

* Refactored code

* Refactored code

* Refactored code

* refactored code

* Refactored code

* Updating log

Co-authored-by: Awais Jibran <awaisdar001@gmail.com>
2021-03-18 12:40:38 +05:00
Matthew Piatetsky
b52037176c Change how we get course ids to avoid memory issues 2021-03-17 17:18:28 -04:00
Matthew Piatetsky
cccd6e8fe7 Call celery task directly from management command instead of calling the signal
AA-461
2021-03-16 16:10:57 -04:00
Awais Qureshi
26ff8b2bb9 Merge pull request #27002 from edx/fixing-test
BOM-2453
2021-03-16 12:08:29 +05: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
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
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
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
Arslan Ashraf
8163d8c772 docs: add annotations for DISABLE_COURSE_CREATION feature flag (#26941) 2021-03-15 08:59:39 -04: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
Matthew Piatetsky
b287940d17 Add management command to export course metadata for all courses 2021-03-12 13:11:51 -05:00
Usman Khalid
78cd8be24d XMLModuleStore should use HiddenDescriptor instead of RawDescriptor.
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.
2021-03-11 22:20:33 +05:00
David Ormsbee
74ef4664c5 fix: Use fallback when titles are unavailable for outlines.
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
2021-03-11 09:19:57 -05:00
Dillon Dumesnil
e641ba368c Merge pull request #26902 from edx/ddumesnil/segment-logout-aa-513
AA-513: Reset segment state if anon user and there is a segment user id
2021-03-10 11:08:16 -08:00
Dillon Dumesnil
16d81f6e6d AA-513: Reset segment state if anon user and there is a segment user id
If we are seeing an anonymous user, but the segment user id is still
set, we believe the segment user id is coming from a different user on
the same machine. This will make sure we clear out that storage and
then the indentify call will make a new anonymous id
2021-03-09 13:17:40 -07:00
David Ormsbee
f5b74fcf31 feat: Backfill and Django Admin for Learning Sequence Outline
* Adds the backfill_course_outlines management command to contentstore
* Adds a read-only Django admin interface to learning_sequences for the
  support team and debugging.
* Adds two new functions to the learning_sequences public API:
  key_supports_outlines and get_course_keys_with_outlines

The learning_sequences app isn't supposed to know about contentstore or
modulestore, as it's intended to be extracted out of edx-platform in the
long term. Therefore, the backfill_course_outlines command is in
contentstore, and not learning_sequences.

This work was tracked in TNL-7983, but it also fixes a bug where we were
trying to generate course outlines for libraries (TNL-7981).

All Open edX instances upgrading to Lilac should run the
backfill_course_outlines command as part of their upgrade process.
2021-03-09 09:05:57 -05:00
Matthew Piatetsky
38ee797cfe Merge pull request #26899 from edx/AA-461
[AA-461] Change course metadata export to be a celery task
2021-03-08 16:54:19 -05:00
Matthew Piatetsky
b1581882e7 fix: Change course metadata export to be a celery task
The terraform policy for the export is already attached to the worker role
AA-461
2021-03-08 15:08:32 -05:00
Kyle McCormick
bcb48525ac refactor: clean up unused ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS (#26900)
The setting overrides should've been cleaned up in a previous
commit, but I missed them. This change is a no-op.
2021-03-08 15:01:12 -05:00