Commit Graph

5629 Commits

Author SHA1 Message Date
Jawayria
b17e69644e Merge pull request #26323 from edx/bom-2314
Applied pylint-amnesty to openedx/core/{djangolib, lib, tests, *.py
2021-02-03 18:46:02 +05:00
M. Zulqarnain
59f4136585 BOM-2316 : Pylint amnesty in openedx apps (#26340)
* lint amnesty in openedx apps
2021-02-03 18:14:49 +05:00
David Ormsbee
185e6c2d76 fix: RST formatting for APIs ADR. (#26336) 2021-02-03 08:13:25 -05:00
Awais Qureshi
139144350f Merge pull request #26339 from edx/BOM-2315
Apply pylint-amnesty
2021-02-03 18:12:00 +05:00
Awais Qureshi
587b32642b BOM-2315
Apply pylint-amnesty.
2021-02-03 17:22:20 +05:00
Jawayria
fc08dd3ff5 Resolved error 2021-02-03 17:13:09 +05:00
stvn
d52ec518cf style: Cleanup DiscussionsConfiguration.__str__
This makes it more useful during debugging, as well as on the Django
Admin page.
2021-02-03 01:58:23 -08:00
M. Zulqarnain
68bb83e727 pylint amnesty in openedx (#26341) 2021-02-03 14:56:09 +05:00
stvn
9df2c4462f fix: Add DiscussionsConfiguration.enabled to admin page
Without this, we can't edit it via the default view.
2021-02-03 01:49:07 -08:00
jawad khan
957f3ab8a5 LEARNER-8191 - Added first_component_block_id in dates api (#26319)
* LEARNER-8191
Added first_componnet_block_id in dates api
2021-02-03 13:53:21 +05:00
Awais Qureshi
0b5cadd176 BOM-2315
Apply pylint-amnesty.
2021-02-03 13:43:47 +05:00
Awais Qureshi
c246ba2e9b BOM-2315
Apply pylint-amnesty.
2021-02-03 12:18:09 +05:00
Awais Qureshi
42e7cac6dc BOM-2315
Apply pylint-amnesty.
2021-02-03 12:15:41 +05:00
stvn
c36c343c58 style: Fix pylint issues in discussions app 2021-02-02 16:57:39 -08:00
Nizar Mahmoud
4e16b92971 Documents maintenance banner setting and toggle and adds necessary unit tests 2021-02-02 23:04:53 +03:00
Jawayria
1e0655d26b Resolved pep8 errors 2021-02-02 21:15:43 +05:00
Jawayria
9909b933a7 Applied pylint-amnesty to openedx/core/{djangolib, lib, tests, *.py 2021-02-02 21:13:24 +05:00
Manjinder Singh
cf350f9c44 fix: Correcting logic for xblock_handler token expiration (#26224)
* fix: Correcting logic for xblock_handler token expiration

The previous math had a date math error which resulted in token expiring in 0-2 days
instead of 2-4 days

Co-authored-by: Feanil Patel <feanil@edx.org>
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2021-02-02 10:52:31 -05:00
stvn
cff2cb8941 feat: Allow filtering of discussion providers
Propose and implement organization-wide discussion-provider filtering.

Fixes: TNL-7814
2021-02-02 06:51:41 -08:00
Robert Raposa
eba1e282da Merge pull request #26175 from open-craft/nizar/tsd-block-structure-storage-caching
[TSD] Annotates block structures settings and waffle switches
2021-02-01 16:53:04 -05:00
Robert Raposa
6e6b6901a0 Merge pull request #26040 from regisb/regisb/remove-waffle-custom-monitoring
[BD-21] Remove soon-to-be-deprecated value monitor in edx-toggles
2021-02-01 14:56:35 -05:00
Nizar Mahmoud
fa9746a714 Annotates block structures settings and waffle switches
This includes the following settings:

- BLOCK_STRUCTURES_SETTINGS : setting dictionary which stores the other different block structures related settings

- BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE'] : keeps only a specific number of versions of each block structure, and deletes the rest

- BLOCK_STRUCTURES_SETTINGS['COURSE_PUBLISH_TASK_DELAY'] : specifies the delay, in seconds, after a new edit of a course is published before updating the block structures cache

- BLOCK_STRUCTURES_SETTINGS['TASK_DEFAULT_RETRY_DELAY'] : Specifies the delay, in seconds, between retry attempts for block structure tasks

- BLOCK_STRUCTURES_SETTINGS['TASK_MAX_RETRIES'] : specifies the max number of retries per block structure task

- BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS'] : specifies the storage which block structures would be saved to when storage backed block structures are enabled

    Example: 'storages.backends.s3boto.S3BotoStorage'

- BLOCK_STRUCTURES_SETTINGS['STORAGE_KWARGS'] : specifies additional arguments needed when utilizing storage for storing storage backed block structures

    Example: { bucket: 'test-edxapp' }

- BLOCK_STRUCTURES_SETTINGS['DIRECTORY_PREFIX'] : specifies the path to which storage backed block structures are saved

    Example: '/courses/'

This also includes the following waffle switches:

- block_structure.storage_backing_for_cache : enables storage backed block structures, used to retrieve the block structures from storage instead of regenerating the structure, when not available in cache

    it is important to note that this is important for production because it reduces response times on block structure related apis

- block_structure.raise_error_when_not_found : raises an error if the block structure requested doesnt exist in store or is outdated

- block_structure.invalidate_cache_on_publish : invalidates the block structure cache when courses are published

For an example with additional context, see the following forum post:

https://discuss.openedx.org/t/help-please-very-slow-load-time-10-seconds-for-courseware-on-sections-with-several-subsections-and-xblocks/2998/16

This also includes information about the toggles that will likely be deprecated and removed:

https://github.com/edx/edx-platform/pull/26175#issuecomment-769080286
2021-02-01 22:55:14 +03:00
Robert Raposa
659675308a Merge pull request #26058 from regisb/regisb/toggle-state-report-unittests
[BD-21] Improve test coverage of toggle state view
2021-02-01 14:53:31 -05:00
Robert Raposa
95126d826c Merge pull request #26169 from regisb/regisb/annotate-calendar-sync
[TSD] Annotate course_experience.calendar_sync
2021-02-01 14:52:24 -05:00
Dillon Dumesnil
71b15df66c Merge pull request #26264 from edx/ddumesnil/reset-deadlines-event-aa-492
AA-492: Adds research tracking event for reset deadlines
2021-02-01 08:09:51 -08:00
Dillon Dumesnil
8c745cabbf AA-492: Adds research tracking event for reset deadlines
This PR also removes the exemption for staff from seeing the reset
deadlines banner (staff will now see the banner). Staff users would
still be unable to submit problems and wouldn't have a way of resetting
their deadlines while enrolled.
2021-02-01 10:48:11 -05:00
Bianca Severino
42e1ac0888 Merge pull request #26182 from edx/bseverino/proctoring-requirements-email
[MST-515] Automated proctoring requirements email
2021-02-01 10:19:56 -05:00
Bianca Severino
902ab02357 Send proctoring requirements email when enrolled in relevant course mode 2021-02-01 09:44:30 -05:00
Zaman Afzal
b99a64c385 ENT-3798 Multiple_SSO_Accounts_Association_to_SAML_User (#26170) 2021-02-01 11:44:12 +05:00
Tim McCormack
ec5b78c625 doc: Clarify location and content of xblock token keys (#26259) 2021-01-29 19:44:26 +00:00
Feanil Patel
855b08bf11 Merge pull request #26210 from edx/feanil/xblock_handler_token_peppers
Change how xBlock URLs are generated to be able to rotate SECRET_KEY
2021-01-29 10:06:36 -05:00
Régis Behmo
d50086a84b Annotate course_experience.calendar_sync
This simply adds code annotations to the course waffle flag, but does not
affect behaviour.
2021-01-29 11:41:40 +01:00
adeelehsan
55d2a4f897 Logistration MFE renamed to authn
VAN-300
2021-01-29 11:37:54 +05:00
Feanil Patel
415dfe469b test: Add tests for XBLOCK_HANDLER_TOKEN_KEYS logic.
This tests the various steps of the rotation process work as we expect.

We set the reference time explicitly due to the bug we found in the
hashing logic which will be fixed in a future ticket.
2021-01-28 15:08:22 -05:00
Feanil Patel
ceb8b3ac51 feat: Code to use a new set of keys for xblock handlers.
The keys will fallback to the Django SECRET_KEY if it's not set or is an
empty list. Instructions for the rotation process are in a comment near
the usage of the new keys in openedx/core/djangoapps/xblock/utils.py.
2021-01-28 15:08:22 -05:00
Feanil Patel
07d11128e3 test: Add baseline tests for secure tokens for xblock handlers.
These tests did not exist so we add them first before making changes.

Add the __init__.py file to make test imports work properly.
ie. To solve https://github.com/pytest-dev/pytest/issues/774

More useful info on how that works here:
https://docs.pytest.org/en/latest/goodpractices.html#choosing-a-test-layout-import-rules
2021-01-28 15:06:35 -05:00
Matthew Piatetsky
ff839c364e Merge pull request #26143 from edx/AA-613
[AA-613] Add contains_content_type_gated_content attribute to display items in the Sequence Metadata API.
2021-01-28 12:28:05 -05:00
Matthew Piatetsky
84fb4679c9 Add contains_content_type_gated_content attribute to display items in the Sequence Metadata API. This attribute is used to display the content type gating paywall in frontend-app-learning.
Also, refactor existing timed exam code that checks for content_type_gated_content in a sequence to make it try with the new code
AA-613
2021-01-28 12:00:53 -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
d531d38ec7 Fix formatting on interapp APIs extension ADR.
The numbered lists were not written correctly.
2021-01-28 09:56:38 -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
jawad khan
cb6f348959 LEARNER-8194
LEARNER-8194
Added self paced in mobile api enrolment api
2021-01-28 13:49:05 +05:00
Carla Duarte
d97b058c5d AA-568: fix start course bug 2021-01-27 15:29:21 -05:00
Manjinder Singh
2723e0e2bd [ARCHBOM-1645] Modifying anonymous_id_for_user() to handly SECRET_KEY rotation (#26162)
These changes were initially made to make it easier to do SECRET_KEY rotations.  Along the way, we found it made sense to refractor the code as well.

Changes made:
- changed get_to_create to create because now the code should only get to this block when a write is necessary
- added a lookup for anonymous_user_id. This is to return an existing anonymous_user_id rather than calculating. This will mitigate the results of SECRET_KEY rotation.
- Added monitoring to help us make better decisions: should we not sue SECRET_KEY, performance considerations...
- put old function behind toggle in case something goes wrong in production with new code
- refractoring function structure for better understanding
2021-01-27 07:23:19 -05:00
Ahtisham Shahid
3dfb25cb5d Updated/refactored logs in auth exchange (#26077) 2021-01-27 12:12:28 +05:00
Christie Rice
b1e5695acf MICROBA-921 Move emit_certificate_event() to utils (#26133) 2021-01-26 14:41:34 -05:00
Kyle McCormick
e3cfaab487 Merge pull request #25955 from open-craft/symbolist/convert-hidden-module-to-xblock
[BD-04] [SE-3708] Convert HiddenDescriptor to an XBlock.
2021-01-26 13:56:06 -05:00
Awais Jibran
eeed906017 Merge pull request #25994 from edx/aj/bulk-email-provide-logo-from-bkend
Provide logo URL from the backend
2021-01-26 15:02:56 +05:00
Robert Raposa
cf626667d6 annotate cookie monitoring toggle
* Annotate cookie monitoring toggle and settings.
* Refactor to replace LegacyWaffleFlag.
2021-01-25 14:42:44 -05:00
Carla Duarte
f03797a882 Merge pull request #26158 from edx/ciduarte/AA-568
AA-568: dates widget styling
2021-01-25 11:15:14 -05:00