Commit Graph

4470 Commits

Author SHA1 Message Date
Feanil Patel
1a1da89f55 Drop setting attributes for the size of each cookie.
Setting a new metric per cookie name resulted in a lot of metrics
getting added to New Relic.  In some cases, this was causing other
more important metrics to not get registered.
2021-01-14 11:03:28 -05: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
Feanil Patel
1ae50fc466 Add more cookie logging code.
We want to be able to easily figure out what our biggest cookies are and we
want to also group cookies by prefix because certain services create multiple
cookies and then put unique identifiers in the cookie name.

For example braze cookie names use the following pattern:
    ab.storage.<userId>
    ab.storage.<deviceId>
    ab.storage.<sessionId>

In this case we want to group all the `ab` cookies together so we can see
their total size.

New attributes:

cookies.<group_prefix>.group.size: The size of a group of cookies. For example
	the sum of the size of all braze cookies would be the value of the
	`cookies.ab.group.size` attribute.
cookies.max.name: The name of the largest cookie sent by the user.
cookies.max.size: The size of the largest cookie sent by the user.
cookies.max.group.name: The name of the largest group of cookies. A single cookie
	counts as a group of one for this calculation.
cookies.max.group.size: The sum total size of all the cookies in the largest group.
2021-01-14 09:55:49 -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
Usman Khalid
9116599f00 Convert HiddenDescriptor to an XBlock.
The class name has been retained because the class path is
specified in the modulestore config in a number of places.
2021-01-14 01:22:08 +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
Simon Chen
78407b4a8f MST-400 Update the support verification_api to provide the correct status under the same API used by learner (#25917) 2020-12-21 09:14:57 -05:00
stvn
c7a4f97ba1 Add get-accessor helper for discussions plugins 2020-12-17 20:08:57 -08:00
stvn
590286f3be Add is_enabled helper for discussions plugins 2020-12-17 19:40:41 -08:00
stvn
39acbf2f21 Implement a new configuration system for discussions plugins
Additional details available in the attached decisions document.

Co-authored-by: Kshitij Sobti <kshitij@sobti.in>
Co-authored-by: stvn <stvn@mit.edu>
2020-12-17 18:23:46 -08:00
Robert Raposa
de16529ab6 Merge pull request #25885 from regisb/regisb/fix-deprecated-waffle-usage
[BD-21] Fix deprecated waffle usage
2020-12-17 12:41:40 -05:00
Robert Raposa
874c3e7b61 Merge pull request #25182 from regisb/regisb/disable-learner-records-from-settings
Add default value for learner records feature toggle in settings
2020-12-17 12:16:40 -05:00
Régis Behmo
bd038bab3c Add default value for learner records feature toggle in settings
The learner records feature had to be enabled/disabled via site-specific
configuration models, which is inconvenient for platforms that want to
disable this feature globally. Here, we introduce a
ENABLE_LEARNER_RECORDS feature toggle in the lms/cms settings that makes
it possible to disable this feature on all sites. Because this feature
toggle is set to True by default, this will not modify the behaviour of
existing platforms.
2020-12-17 16:28:04 +01:00
Carla Duarte
3fb3f913b5 Merge pull request #25661 from edx/ciduarte/AA-131
AA-131: Allow anonymous users through course home MFE
2020-12-16 15:49:20 -05:00
srwang
b95739c153 Merge pull request #25888 from edx/swang/ws-1591
WS-1591: change Prospectus user dropdown to show avatar instead of username
2020-12-16 13:40:30 -05:00
Sharon Wang
70cf6ddbf8 fix lint error 2020-12-16 13:16:50 -05:00
Carla Duarte
99163bdf2c AA-131: Allow anonymous users through course home MFE 2020-12-16 12:58:33 -05:00
Sharon Wang
8889180b59 code review comments and lint 2020-12-16 09:45:31 -05:00
Sharon Wang
88b838f608 exception for profile 2020-12-16 08:58:25 -05:00
Waheed Ahmed
5fce6c28d7 Add logs around all password reset requests.
VAN-192
2020-12-16 15:30:39 +05:00
Muhammad Soban Javed
bd601cf3a6 Update celery routing for celery 4+ (#25567)
* Update celery routing

- Used routing function instead of class
- Move task queues dictionary to Django settings
- Removed routing_key parameter
- Refactored routing for singleton celery instantiation

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2020-12-16 13:40:47 +05:00
Sharon Wang
910f1c45c3 test passing 2020-12-15 16:58:48 -05:00
Sharon Wang
15c9ad1140 user cookie test wip 2020-12-15 15:44:17 -05:00
Sharon Wang
97fb51ce67 sos 2020-12-15 15:22:28 -05:00
Raul Gallegos
d3584ad559 SE-3764: adds a new bundle_draft_files cache key (#25881)
Updates the bundle_draft_files cache key to be _v2 so we avoid reading
invalid values cached by a past version of this code with no timeout.

TNL-7771
2020-12-15 11:09:04 -05:00