Commit Graph

3988 Commits

Author SHA1 Message Date
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
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
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
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
Bianca Severino
2a7fe2a385 Merge pull request #26062 from edx/bseverino/enrollment-api
[MST-570] Create runtime api to return active enrollments by course
2021-01-14 09:56:29 -05:00
Calen Pennington
197c6d11ee Merge pull request #26043 from cpennington/user-profile-segment-identify
Call segment.identify with any changed values when user profile field…
2021-01-14 08:54:21 -05:00
Zach Hancock
3a738e6c02 Create runtime api to return active enrollments by course
Co-authored-by: Bianca Severino <biancasev@gmail.com>
2021-01-13 16:45:40 -05:00
Calen Pennington
f42dfe69d2 Remove emit_setting_changed_event in favor of emit_settings_changed_event 2021-01-13 15:58:55 -05:00
Calen Pennington
c8b6d69341 Implement emit_setting_changed_event in terms of emit_settings_changed_event 2021-01-13 15:58:55 -05:00
Régis Behmo
e9de9257cd Improve test coverage of toggle state view 2021-01-13 17:09:24 +01:00
Calen Pennington
fdac36ec13 Call segment.identify with any changed values when user profile fields change 2021-01-13 10:40:25 -05:00
Régis Behmo
16ad959d7b Refactor: convert view methods to functions for easier testing
Just removing the `self` argument from all methods is enough to convert them to simple functions.
2021-01-13 16:31:15 +01:00
Robert Raposa
e0aa459732 Merge pull request #26017 from regisb/regisb/refactor_set_request_cache
[BD-21] Get rid of calls to `set_request_cache_with_short_name`
2021-01-13 09:57:13 -05:00
Robert Raposa
50b705405e Merge pull request #26042 from regisb/regisb/update-waffle-util-adr
[BD-21] Document non-namespaced waffle classes in ADR
2021-01-13 09:56:35 -05:00
Ahtisham Shahid
780deeed7a Merge pull request #217 from edx/ahtisham/PROD-1916-p
Error incase of disabled user social login
2021-01-13 16:24:02 +05:00
Régis Behmo
d04d4291f5 Document non-namespaced waffle classes in ADR
It was finally decided not to use `skip_namespace_assertion` optional
arguments, but `NonNamespacedWaffle*` classes. We update the ADR to reflect
this change.
2021-01-12 16:58:11 +01:00
Régis Behmo
3a29cff016 Get rid of calls to set_request_cache_with_short_name
This method from the toggle legacy classes should not actually be
exposed to all. So we get rid of it by manually setting the cached
value. While we are at it, we convert the STORAGE_BACKING_FOR_CACHE
legacy waffle switch to its modern version. As the flag is not being
used elsewhere, this should not break anything.

We take the opportunity to modernize waffle switches from
block_structure.config: to do so we convert the INVALIDATE_CACHE_ON_PUBLISH and
RAISE_ERROR_WHEN_NOT_FOUND waffle switches from legacy classes to their modern
equivalents. These switches are not used outside of edx-platform, so this
change should not trigger any error.
2021-01-12 16:52:08 +01:00
Régis Behmo
8199c78def Remove soon-to-be-deprecated value monitor in edx-toggles
The WAFFLE_FLAG_CUSTOM_ATTRIBUTES setting and the WaffleFlag.set_monitor_value
method are soon going to be deprecated in edx-toggles. This is going to be done
in a backward-compatible manner, but we'd better be safe by removing references
to these objects early.
2021-01-12 15:52:55 +01:00
Ahtisham Shahid
32985420c0 Added named logs (#26036)
Added named logs
2021-01-12 13:28:47 +05:00
Nizar
1e872d4e10 Adds support for enabling custom tinymce plugins in Studio's HTML editor (#25695) 2021-01-11 11:28:20 -05:00
Matthew Piatetsky
53ccf9bd84 Merge pull request #25988 from edx/AA-488
[AA-488] Remove uses of the active field on the schedule model in the code.
2021-01-11 09:34:00 -05:00
Ahtisham Shahid
33fb1e6b4a added logs in oauth exchange (#26005) 2021-01-11 19:05:28 +05:00
Usman Khalid
9e38b17202 Convert ErrorModule and NonStaffErrorModule to XBlocks. (#25570) 2021-01-07 10:51:33 -05:00
Tobias Macey
50bb70298c Added a configuration flag to force third party auth (#24789)
This adds a toggle to allow operators to prevent user registration and login via username/password authentication, forcing the platform to only support login and registration using third-party auth such as SAML.

Co-authored-by: Umar Asghar <mrumarasghar@gmail.com>
2021-01-07 09:55:27 -05:00
alangsto
40cf6ba413 updated endpoint for verifications to include receipt id (#25999) 2021-01-07 08:34:03 -05:00
Zainab Amir
aa3119e4d7 Add new relic metrics (#26003) 2021-01-07 18:08:09 +05:00
Ahtisham Shahid
b2466c8c2b Error incase of disabled user social login
Updated status code and manage user func

update auth verification

Fixed auth condition

fixed test failuers

fixed style issues

fixed style issues

Created test for auth disabled use

Code refactor

Fixed form ain auth exchange

Fixed oauth apps with disabled user fail

applied quality fixes

Refactored tests

fixed quality issues

removed extra files

Fixed linter issues

Fixed linter issues
2021-01-06 20:37:01 +05:00
Awais Jibran
159031adc9 quality fixes 2021-01-06 20:23:16 +05:00
Awais Jibran
7e20cf2215 Provide logo URL from the backend 2021-01-06 17:30:13 +05:00
Matthew Piatetsky
101c9b6633 Remove uses of the active field on the schedule model in the code.
Removing the active field from the model itself and the database is broken out into a separate ticket (AA-574)
AA-488
2021-01-05 18:25:44 -05:00
edX requirements bot
5c186507c3 Python Requirements Update (#25977)
* Updating Python Requirements

* Fixing test failure.

* Update timezone count for new pytz version

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
Co-authored-by: usamasadiq <usama.sadiq@arbisoft.com>
2021-01-05 14:12:03 +05:00
Zainab Amir
d5c9536f0a send in-active user details on auth failure (#25931) 2021-01-05 10:33:04 +05:00