Commit Graph

4470 Commits

Author SHA1 Message Date
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
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
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
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
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
Alex Dusenbery
135e9acf5f Update edx-enterprise to 3.17.11 and edx-rbac to 1.4.1; Adds an optional applies_to_all_contexts field to the SystemWideRoleAssignment model. 2021-01-25 09:51:48 -05:00
David Ormsbee
a2fc100ebc Merge pull request #26135 from open-craft/libraries-v2-anon-ids-shim-fix
[MNG-1904] Fix: update new runtime's runtime.anonymous_student_id to store in DB
2021-01-22 10:03:42 -05:00
Waheed Ahmed
f6287694ae Keep enterprise user on monolith FE.
If an enterprise customer is associated with the request,
keep the user on the monolith FE and do not redirect them to
MFE.

VAN-125
2021-01-22 17:01:00 +05:00
jawad khan
091b2bc1fa LEARNER-8097
LEARNER-8097
Added self paced in course serializer
2021-01-22 13:18:35 +05:00
Braden MacDonald
ae16394ee5 Fix: update new runtime's runtime.anonymous_student_id to store in DB
This addresses a longstanding TODO item to make runtime.anonymous_student_id for content libraries v2 work the same way as it does for XBlocks in regular courses, persisting the "context ID" (equivalent to course ID) to the database. This way, if SECRET KEY is changed, existing anonymous IDs will continue to work unchanged.

This is a potentially breaking change, but should mostly affect capa problems using external code graders or Matlab code input, and I'm not aware of any such usage of the new runtime / libraries v2.
2021-01-21 15:38:53 -08:00
Matthew Piatetsky
84ba4ec635 Only set due dates on subsections that contain graded assignments with a score and a nonzero weight
Previously we were only checking the graded attribute which doesn't account for ungraded assignments
https://openedx.atlassian.net/browse/AA-497
2021-01-20 16:30:20 -05:00
Syed Muhammad Dawoud Sheraz Ali
985229fb7a add last_login user and staff only field in user_api (#26087)
* add last_login user and staff only field in user_api
2021-01-18 19:36:01 +05:00
Robert Raposa
8b4ea05d5e fix cookie monitoring middleware
The cases of no cookies or no cookie groups
found would cause an error. This was fixed
and additional test coverage was added.
2021-01-15 15:07:22 -05:00
Jayram
5a9e12dd96 [ADD] user account registration endpoint for api-docs
Added alias for /user_api endpoints

FIX quality violations

IMPROVED urls_common for readability

Removed redundant URL entry from urls_common file
2021-01-15 03:59:16 +00:00
Feanil Patel
4047a72701 Merge pull request #26065 from edx/feanil/update_cookie_metrics
Add more cookie logging code.
2021-01-14 16:30:34 -05:00
Feanil Patel
e5e2b7f7b6 Only capture the top N cookies and cookie groups.
Instead of adding new attributes for each cookie name we create
consistent attribute names.  This should prevent any issues where we
have too many different unique attribute names because the cookie names
are unique to the user.

We added two new settings to make the number of cookies and groups
capture configurable:

- TOP_N_COOKIES_CAPTURED
- TOP_N_COOKIE_GROUPS_CAPTURED
2021-01-14 15:49:15 -05:00