Commit Graph

5629 Commits

Author SHA1 Message Date
Carla Duarte
878f9a3064 AA-568: dates widget styling 2021-01-25 10:51:20 -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
0101eefe73 Merge pull request #26110 from edx/AA-497
[AA-497] Only set due dates on subsections that contain graded assignments with a score and a nonzero weight
2021-01-21 11:23:21 -05:00
Kyle McCormick
44d5060c60 Add setting for error'ing on deprecated imports
Deprecated edx-platform import paths
(for example, `student` instead of
`common.djangoapps.student`) currently raise
warnings when used. We want to fully remove
support for those paths.

As an easily reversible way to initially remove
support, we add a new setting to LMS and Studio
called `ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS`,
defaulting to False. We set it to True for devstack
and will set it to True in Stage and Production
soon. If critical errors occur, we can easily
flip the setting back to False.
2021-01-21 10:49:47 -05: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
Kshitij Sobti
6769a280a9 Added a new LTI-based course tab, and LtiDiscussion tab
This PR lays the groundwork for a an LTI tab that can embed any LTI1.1-based
tool as an course tab. It also adds another tab based on this LTI Tab that
offers special support for embedding LTI-based discussion tools in a course
tab. If enabled this will replace the existing discussion tab.
2021-01-20 16:24:55 +05:30
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
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
Michael Terry
1482755bbd Show discount deadline in a timezone-aware way
Also, fix it and the access expiration deadline to not hardcode
the date presentation in an American way.
2021-01-08 13:56:18 -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