Commit Graph

9413 Commits

Author SHA1 Message Date
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
Kyle McCormick
2b5d916512 refactor!: deprecated import paths now always raise
Previously, deprecated [lms|cms|common]/djangoapps
import paths would only raise errors if the
ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS
flag, which defaulted to False (but is overriden
to True for Devstack and *.edx.org), was enabled.

This change removes that setting and always raises
on use those deprecated import paths.
2021-03-08 12:49:31 -05:00
Sarina Canelake
3cbf7d80f1 Merge pull request #26106 from open-craft/mavidser/se-3685-hide-help-link
Add option to disable the help link in the navbar
2021-03-08 10:24:30 -05:00
Kyle McCormick
f54e3752fa fix: lower bundle cache timeout from 47hrs to 50mins (#26863)
S3 URLs served by Blockstore have a max TTL of
1hr, since the temporary credentials the Blockstore
uses to sign the URLs themselves have a TTL of
1hr. Thus, we must cache Blockstore bundles for
less than 1hr.

TNL-7771
2021-03-08 08:47:30 -05:00
Matthew Piatetsky
b8da9fb59b Merge pull request #26868 from edx/AA-461
[AA-461] Add temporary debugging logs to determine why the highlights export is not working
2021-03-08 07:01:50 -05:00
Matthew Piatetsky
b46da1a7c1 Add temporary debugging logs to determine why the highlights export is not working 2021-03-05 10:23:35 -05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Matthew Piatetsky
013f7bfe34 Merge pull request #26744 from edx/AA-461
[AA-461] Export highlights to s3 for use by braze
2021-03-05 06:46:57 -05:00
M. Zulqarnain
41e5403f4e BOM-2369 (D): pyupgrade on contentstore/views (#26767)
* pyupgrade on contentstore/views

* Apply suggestions from code review

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-05 14:55:14 +05:00
Sid Verma
e66b9e7fff Add option to disable the help link 2021-03-05 08:36:28 +05:30
Matthew Piatetsky
8d1d7b2222 feat: Export highlights to s3 for use by braze
Things other than highlights may be exported in the future. The storage class is flexible so backends other than s3 may be used in the future.
AA-461
2021-03-04 15:57:30 -05:00
M. Zulqarnain
5562944e87 BOM-2369 (A): pyupgrade on api,contentstore and cms_user_tasks apps under CMS (#26676)
* pyupgrade on cms api,contentstore and cms_user_tasks apps
2021-03-04 15:06:07 +05:00
M. Zulqarnain
fa271dafe9 BOM-2369 (C): pyupgrade on contentstore/tests (#26759)
* pyupgrade on contentstore/tests
2021-03-04 14:37:39 +05:00
M. Zulqarnain
da970bf215 BOM-2369 (B): Pyupgrade on contentstore/management (#26758)
* pyupgrade on contentstore/management
2021-03-04 14:31:10 +05:00
Matt Tuchfarber
0feeaaf817 Add credentials service username to common cms
We're now calling programs-related code from CMS so we need to have the
username for the credentials service available in CMS
2021-03-03 11:46:32 -05:00
Sarina Canelake
e15e372233 Merge pull request #26772 from edx/sarina/DEPR-142-TNL-7522
Remove the "role of users being enrolled" field from Instructor Dashboard
2021-03-03 08:57:16 -05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00