Commit Graph

5589 Commits

Author SHA1 Message Date
Jawayria
3ce03896af Applied pylint-amnesty to status 2021-02-02 13:38:45 +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
Feanil Patel
50efb38ccc Add Anonymous ID related ADR.
For a given course/user tuple, anonymous ID will not change once it
has been generated and saved.
2021-01-29 14:12:19 -05:00
Luis Moreno
a1664d2fd8 feat: Move student.courseenrollment_admin from LegacyWaffleSwitch t a WaffleSwitch and add annotations 2021-01-29 09:31:02 -04:00
adeelehsan
55d2a4f897 Logistration MFE renamed to authn
VAN-300
2021-01-29 11:37:54 +05:00
Albert (AJ) St. Aubin
1927ea234a [MICROBA-952] Updating CourseEntitlements Admin to disallow changes to
order number
.
2021-01-28 08:55:53 -05:00
Tim McCormack
4359be96f3 Tweaks to anonymous user ID code path monitoring (#26194)
- Use different attribute names for new and old versions of function
- Use a shorter name overall (for ease of analysis)
- Add monitor for fetched-existing case
- Only record computed-stored if `get_or_create` succeeds, but also
  break it into created vs. fetched cases by checking return value
- Correct name of monitor in `except` clause -- that should only happen
  for a race inside `get_or_create` itself. There's a different race in
  the `anonymous_uid_for_user` between fetch and compute/save.
- Other name tweaks

ARCHBOM-1674
2021-01-27 16:12:55 +00:00
Tim McCormack
e0e03dec5f Use more appropriate hash when making tracking ID; document SECRET_KEY use (#26134)
- Make it easier to rotate `SECRET_KEY` by documenting this usage
  for both sensitivity and rotation process. (ARCHBOM-1676).
- Just use a hash of the secret rather than HMAC + MD5. We're not
  authenticating a message, so HMAC isn't really needed -- it just needs
  to be unique, deterministic, and irreversible. SHAKE allows generation
  of an arbitrary length hash without needing to truncate.

Also, rename tracking session ID generator for clarity -- there's no
encryption happening here.

Add additional test for existing claim of uniqueness.
2021-01-27 14:13:42 +00:00
Muhammad Soban Javed
d26a59eb67 import task decorator from celery APP instance in CMS (#25953)
* import task decorator from celery APP instance instead of celery package in CMS

* replaced task decorator with shared_task in cms and common

* Fixed import of shared_task

* Fixed import
2021-01-27 18:35:11 +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
Tim McCormack
0fbd134c55 Add monitoring for anonymous user ID code paths (#26176)
For ARCHBOM-1674 we need more information on how often save=False is
actually used vs. other code paths.
2021-01-26 18:06:39 +00: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
M. Zulqarnain
bfabc1ff41 BOM-2233 : Upgrade social-auth-core to > 4.0 (#26055)
* Upgrade social-auth-core

* Fixing a test.

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2021-01-21 12:54:26 +05:00
Zainab Amir
7737c67588 Add query param to account activation redirect (#26107) 2021-01-21 10:18:54 +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
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
Tim McCormack
129cd48266 Include security patch for pinning JWT signature algorithm in apple-id (#26059)
Extract from social-auth-core eed3007c4ccdbe959b1a3ac83102fe869d261948
2021-01-13 17:19:37 +00:00
Calen Pennington
fdac36ec13 Call segment.identify with any changed values when user profile fields change 2021-01-13 10:40:25 -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
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
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
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
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
Awais Qureshi
1f616f6fcd Fixing make docs
Adding constraint on sphinx.
2021-01-05 22:42:01 +05:00
Zainab Amir
d5c9536f0a send in-active user details on auth failure (#25931) 2021-01-05 10:33:04 +05:00
David Ormsbee
bb0492e598 Merge pull request #25338 from open-craft/nizar/xframe_allow_whitelist
Sets default X-Frame-Options for login and registration forms to environment setting
2020-12-18 12:39:08 -05:00
Dillon Dumesnil
2f7fcdea85 Merge pull request #25897 from edx/ddumesnil/fix-masquerade-for-mfe
Fixes for Shift deadlines during masquerade in Learning MFE
2020-12-16 11:57:23 -08:00
Dillon Dumesnil
e1517223b9 Fixes for Shift deadlines during masquerade in Learning MFE
The change to masquerade in the courseware view allows the proper
viewing of the xblock from the perspective of the masqueraded user.
In this case, it allows a staff user masquerading as a learner to see
their shift dates calls to action inside the MFE (the old view already
had this set up). The second change allows the staff user masquerading
to reset the schedule of the learner being masqueraded via the CTAs
2020-12-16 19:13:33 +00: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
Nizar Mahmoud
6e0b304f65 Sets default X-Frame-Options for login and registration forms to X_FRAME_OPTIONS environment setting 2020-12-12 04:03:26 +03:00
Kyle McCormick
643fbe82a0 Downgrade REDIRECT_TO_COURSEWARE_MICROFRONTEND to CourseWaffleFlag (#25815)
The toggle was previously an ExperimentWaffleFlag,
which allows stable A/B testing but increases the toggle's
complexity. Since we do not plan an doing any more A/B
tests as part of the MFE rollout, we can 'downgrade' this
toggle to a CourseWaffleFlag, which still allows us to do
phased rollout and course-run-specific overrides.
2020-12-09 13:48:47 -05:00
Dillon Dumesnil
354c9ada5f Merge pull request #25804 from edx/ddumesnil/aa-471
AA-471: Removing the export_staff_users command
2020-12-08 12:40:36 -08:00
Dillon Dumesnil
38a7e0b5a8 AA-471: Removing the export_staff_users command 2020-12-08 19:37:26 +00:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01:00
Kyle McCormick
4dda73d797 [BD-14] Migrate all environments to use database-backed organizations (#25153)
* Install `organizations` app into LMS and Studio non-optionally.
* Add toggle `ORGANIZATIONS_AUTOCREATE` to Studio.
* Remove the `FEATURES["ORGANIZATIONS_APP"]` toggle.
* Use the new `organizations.api.ensure_organization` function to
  either validate or get-or-create organizations, depending
  on the value of `ORGANIZATIONS_AUTOCREATE`,
  when creating course runs and V2 content libraries.
  We'll soon use it for V1 content libraries as well.
* Remove the `util.organizations_helpers` wrapper layer
  that had to exist because `organizations` was an optional app.
* Add `.get_library_keys()` method to the Split modulestore.
* Add Studio management command for backfilling organizations tables
  (`backfill_orgs_and_org_courses`).

For full details, see
https://github.com/edx/edx-organizations/blob/master/docs/decisions/0001-phase-in-db-backed-organizations-to-all.rst

TNL-7646
2020-12-02 13:58:40 -05:00
Feanil Patel
e90c6ae5a2 Remove all models related to shoppingcart.
DEPR-43 - Removal of Shoppingcart.

All models have been removed and the change has been deployed to production
so this should be safe to do.

It's strange that the ORM decided to drop certain fields before dropping the
whole models but decided to leave it all as the ORM generated it rather than
trying to manually change it.

Also turn the check back on to make sure people don't actually check in code
without the relevant migration files.
2020-12-02 11:36:07 -05:00
Michael Terry
181cb70149 Merge pull request #25670 from edx/mikix/as-user-timezone
AA-459: Respect user's timezone in access-expiration message
2020-12-01 09:13:45 -05:00
Simon Chen
00ad36839d MST-542 Roll out Accounts MFE IDV workflow (#25613)
* MST-542 remove the IDV redirect to Account MFE waffle flag to permanently redirect learners to new IDV workflow. This completes the rollout process on edx-platform
2020-12-01 09:08:12 -05:00
Michael Terry
e8d9a254bd AA-459: Respect user's timezone in access-expiration message
Before, it would just always use UTC.
2020-11-24 12:02:19 -05:00
Troy Sankey
9d72a78546 Merge pull request #25630 from edx/robrap/fix-segment-error
track: catch unhandled exceptions and add monitoring
2020-11-19 09:12:37 -05:00
Saleem Latif
54f59bc3b4 Revert migration update as it creates more issues than it fixes. 2020-11-19 11:25:16 +05:00
Robert Raposa
186f5fbce2 track: catch unhandled exceptions and add monitoring
Add the following monitoring custom attributes:
- segment_event_name
- segment_event_source
- segment_unexpected_context
- segment_unexpected_data

Also, this explicitly raises a validation error whenever context is a
string instead of throwing a vague TypeError.

Related to LEARNER-8034
2020-11-18 21:45:00 -05:00
David Ormsbee
99021bb7c3 Merge pull request #25405 from open-craft/mavidser/se-3398-fix-activation-email-context
Include common base contexts in user activation email
2020-11-18 09:37:12 -05:00
Robert Raposa
8eef18710d set code_owner for celery tasks
ARCHBOM-1260

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2020-11-17 15:33:33 -05:00
Ned Batchelder
9a72148310 Squash a regex warning
warnings.py:109 - /edx/app/edxapp/edx-platform/common/djangoapps/static_replace/__init__.py:76: DeprecationWarning: Flags not at the start of the expression '\n        (?x)       ' (truncated)
2020-11-16 10:21:49 -05:00
Zainab Amir
2cf023bf27 VAN-92: Update TPA Context with platform name (#25580) 2020-11-13 17:15:53 +05:00