Commit Graph

6182 Commits

Author SHA1 Message Date
Muhammad Adeel Tajamul
3d5f4983c5 feat: added anonymous id in edx.bi.user.account.authenticated event (#35934) 2024-12-02 13:22:27 +05:00
0x29a
ac9861fd73 feat: add has_course_author_access to CourseHomeMetadataView response 2024-11-29 00:39:58 +05:30
Irtaza Akram
ec2a698604 cleanup references of python 2 & <3.11 (#35799)
* chore: cleanup of old python references
2024-11-15 16:58:20 +05:00
Brian Mesick
e478975105 chore: Add missing PII annotations, update safelist
PII Annotations are very out of date, this commit adds most that were
missing in edx-platform, and some additional annotations to the
safelist. It is not comprehensive, several other upstream Open edX
packages also need to be updated. It also does not include removing
annotations that have been moved upstream, or been removed entirely.
Those are separate follow-on tasks.
2024-11-05 12:58:36 -05:00
Kira Miller
10a876ffbd fix: removing migration check after dropping column in table (#35742) 2024-10-30 09:12:35 -06:00
github-actions[bot]
471e5bf1a2 feat: Upgrade Python dependency edx-enterprise (#35704)
* feat: Upgrade Python dependency edx-enterprise

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

* fix: skip failing migration check

---------

Co-authored-by: kiram15 <31229189+kiram15@users.noreply.github.com>
Co-authored-by: Kira Miller <kira.miller15@yahoo.com>
2024-10-23 15:48:22 -06:00
José Ignacio Palma
123ad8d82c feat: adds CourseAboutPageURLRequested and LMSPageURLRequested filters (#35142) 2024-10-21 10:35:00 -04:00
Attiya Ishaque
cf8ed149d4 fix: fix track selection (#35648) 2024-10-14 16:45:04 +05:00
Attiya Ishaque
319dd7f38c feat: remove all the commerce coordinator (#35527) 2024-10-14 13:12:38 +05:00
Diana Huang
3d637ebb04 docs: Add README for third_party_auth. (#35608) 2024-10-07 18:34:38 +00:00
Hamza Waleed
36a413a3cf Merge branch 'master' into hamza/ENT-9440-samlproviderconfig-history-tracking 2024-10-07 14:39:44 +05:00
Zachary Hancock
c34ccffc7f feat: rework idv cert trigger (#35580)
* feat: rework idv cert trigger
* feat: separate PhotoVerification events
2024-10-04 12:58:15 -04:00
Hamza Waleed
94ffffbbed Merge branch 'master' into hamza/ENT-9440-samlproviderconfig-history-tracking 2024-10-03 11:22:16 +05:00
Deborah Kaplan
8c923bea24 feat!: removes deprecated v1 certificate behavior (#35562)
* feat!: removes deprecated v1 certificate behavior

this removes the long-deprecated v1  certificate behavior. This removes
the old-style date selection behavior  (ie., not a choice between
*Immediately upon passing*, *End date of course*, *A date after the course
end date*), which is no longer reliably maintained or supported in
Studio or Credentials.

FIXES: #35399
2024-10-02 12:06:57 -04:00
hamzawaleed01
2a9e8b3ec6 feat: history tracking on SAMLProviderConfig model 2024-10-02 17:54:57 +05:00
Zachary Hancock
0196def99d feat: use idv approved event (#35470)
* feat: replace LEARNER_NOW_VERIFIED signal with new openedx-event
2024-09-19 09:24:20 -04:00
Mohammad Ahtasham ul Hassan
6a63cfcaa4 feat: add override option to upgrade CTA utils and add course_run_key identifier (#35441)
* feat: add override option to upgrade CTAs and send course_run_key identifier
2024-09-16 13:15:51 +05:00
MueezKhan246
3ad2a70462 feat: Upgrade Python dependency edx-enterprise and remove unencrypted client credentials
1. Upgraded Python dependency edx-enterprise
   - Added migration for removing unencrypted client credentials

2. Test updates
   - Unskipped `test_migrations_are_in_sync` after adding the migration

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-09-10 21:35:47 +05:00
MueezKhan246
faa020940c feat: Upgrade Python dependency edx-enterprise and remove unencrypted credentials from SAP config
1. Upgraded Python dependency edx-enterprise
   - Removed unencrypted credentials from SAP configuration model

2. Test updates
   - Skipped `test_migrations_are_in_sync` for unencrypted credentials removal
   - Updated related tests and requirements.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-09-10 13:06:11 +00:00
MueezKhan246
c658287386 feat: Upgrade Python dependency edx-enterprise and re-enable migrations test
- Upgraded Python dependency `edx-enterprise` and updated relevant requirements files.
- Added migration file to remove `char field decrypted_secret`.
- Re-enabled `test_migrations_are_in_sync` by unskipping the test.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`.
2024-09-06 10:10:38 +00:00
MueezKhan246
5dfc5b0fc9 feat: Upgrade Python dependency and refactor test skip reason
- Upgraded Python dependency for edx-enterprise
- Removed references to the char field `decrypted_secret`
- Updated the skip reason message for `test_migrations_are_in_sync`

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-09-05 16:24:08 +00:00
Juliana Kang
51d538cbe7 fix: Remove B2C Subscriptions (#35303)
REV-3697
2024-09-04 14:01:45 -04:00
Muhammad Sameer Amin
14d2c4e967 feat: skip migrations_are_in_sync test 2024-09-02 17:40:53 +05:00
Feanil Patel
68ef001c91 fix: Remove errant pluses from a bad merge. 2024-07-25 10:24:36 -04:00
Feanil Patel
ff77964414 Merge commit from fork
fix: cohorts data can be private
2024-07-25 10:08:25 -04:00
Awais Ansari
1fb20b3598 feat: update account verification email context (#35165) 2024-07-24 14:40:58 +05:00
Andrey Cañon
c370028bbd feat: modify PhoneNumberSerializer regex to allow plus symbol at the … (#35117)
* feat: modify PhoneNumberSerializer regex to allow plus symbol at the beginning
* chore: update PhonenumberSerializer docstring
2024-07-17 09:08:44 -04:00
Kyrylo Kireiev
53174178f3 feat: [FC-0047] Extend mobile API with course progress and primary courses on dashboard view (#34848)
* feat: [AXM-24] Update structure for course enrollments API (#2515)
---------
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)
---------
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>

* feat: [AXM-297] Add progress to assignments in BlocksInfoInCourseView API (#2546)
---------
Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>
2024-07-10 20:07:41 +05:00
Syed Sajjad Hussain Shah
67a1401f8a fix: should autogenerate username in tpa pipeline if feature is enabled (#35101) 2024-07-09 08:39:36 +00:00
Zaman Afzal
06264e7321 feat: Update social_user uid using csv from admin panel (#35048) 2024-07-02 14:08:27 +05:00
hamzawaleed01
610588ac43 feat: bump enterprise to 4.20.6 2024-06-20 15:40:47 +05:00
Alex Dusenbery
cb6e69f64b feat: edx-enterprise 4.20.5
submit the create_enterprise_enrollment task with a configurable countdown
2024-06-17 10:15:30 -04:00
Glib Glugovskiy
0153086b61 fix: add edit permissions for limited staff only in LMS 2024-06-17 10:00:39 -04:00
MushtaqRossier
ead0468965 Merge pull request #34941 from openedx/mrossier/SONIC-529
feat: Added some extra logs
2024-06-07 13:43:02 +02:00
Attiya Ishaque
0cb2db14a2 fix: add auto_generated_username flag in activation email (#34931) 2024-06-07 15:52:45 +05:00
Mushtaq Rossier
e8a85320ab feat: Added some extra logs 2024-06-07 09:57:22 +02:00
Mushtaq Rossier
eb2b51d02e feat: Added extra info logs for refundable method 2024-06-05 12:40:01 +02:00
sohailfatima
17f48adb49 feat: remove unnecessary PII 2024-06-04 12:08:52 +05:00
sohailfatima
8e7a5f18c7 feat: added tracking events for password reset initiation 2024-06-04 12:08:52 +05:00
Kyle McCormick
ccf2b75204 fix: stabilize makemigrations when SITE_ID != 1 (#34787)
Some models in third_party_auth used settings.SITE_ID as a field
default, which caused Django to say migrations were out of sync whenever
settings.SITE_ID happened to be anything other than 1 for any developer:

    Your models in app(s): 'third_party_auth' have changes that are not
    yet reflected in a migration, and so won't be applied. Run
    'manage.py makemigrations' to make new migrations, and then re-run
    'manage.py migrate' to apply them.

This could easily happen if a developer is testing out site
configuration or site-specific theming and ends up with a SITE_ID other
than 1.

The fix, inspired by a StackOverflow answer [1], is to simply create
a wrapper function for the dynamic default value. The wrapper function,
rather than the current value of SITE_ID, will be serialized to the
migraiton file.

This commit includes a migration file, but from a database perspective,
the migration is a no-op.

[1] https://stackoverflow.com/a/12654998
2024-05-22 13:52:53 -04:00
Jesper Hodge
e95d7e7e32 fix: libraries performance problem
This is an attempt to fix a performance problem on the libraries home page. When you go to studio home and click on the libraries tab, on prod it will be quick for admins but extremely slow for course instructors (> 12 seconds) and leads to timeouts. It grows with the number of libraries that are assigned to the instructor.

The Python code for the request to load libraries for a particular user goes through all existing libraries and then checks all of the user's roles for each library, which results in a complexity of O(l*r), l=libraries, r=roles. This PR improves the complexity to O(l).

The BulkRoleCache and RoleCache classes were using a python set to store all roles for a particular user. A user can have a large number of roles, and lookup speed of iterating through a set is slow (O(n)). Most roles don't have the same course id, however. So if you have the course id of the role you're looking for, we can use a dict of course ids that contain related roles. The number of roles per course id is negligible, so we arrive at a lookup speed of O(1) when looking up a user's roles that belong to a specific course id.

The BulkRoleCache now caches and stores user roles in a data structure like this:
    {
        user_id_1: {
            course_id_1: {role1, role2, role3},  # Set of roles associated with course_id_1
            course_id_2: {role4, role5, role6},  # Set of roles associated with course_id_2
            [ROLE_CACHE_UNGROUPED_ROLES_KEY]: {role7, role8}  # Set of roles not tied to any specific course or library. For example, Global Staff roles.
        },
        user_id_2: { ... }  # Similar structure for another user
    }

While this changes the data structure used to store roles under the hood and adds the new property `roles_by_course_id` to the RoleCache,
when initializing the RoleCache will store roles additionally in the previous data structure - as a flat set - in the `_roles` property accessible via `all_roles_set`. This establishes
backwards compatibility.

We are now storing roles twice in the RoleCache (in each of the two data structures), which means this takes twice as much memory, but only in the scope of a request.
2024-05-20 16:34:08 -04:00
Glenn R. Martin
20c8fc127b fix: logging emission of REFUND_ORDER 2024-05-17 11:55:47 -04:00
Kyle McCormick
15caa9746f refactor: Completely remove Blockstore (#34739)
Blockstore and all of its (experimental) functionality has been replaced with
openedx-learning, aka "Learning Core". This commit uninstalls the now-unused
openedx-blockstore package and removes all dangling references to it.

Note: This also removes the `copy_library_from_v1_to_v2` management command,
which has been broken ever since we switched from Blockstore to Learning Core.

Part of this DEPR: https://github.com/openedx/public-engineering/issues/238
2024-05-13 09:48:18 -04:00
Muhammad Anas
aea7fcee45 feat: added feature flag to enable blake2b hashing 2024-04-22 14:09:41 -04:00
Jillian
d67211051b feat: restrict Studio search results based on user permissions (#34471)
* feat: adds SearchAccess model

Stores a numeric ID for each course + library, which will generally be
shorter than the full context_key, so we can pack more of them into the
the Meilisearch search filter.

Also:

* Adds data migration pre-populates the SearchAccess model from the existing
  CourseOverview and ContentLibrary records
* Adds signal handlers to add/remove SearchAccess entries when content
  is created or deleted.
* Adds get_access_ids_for_request() helper method for use in views.
* Adds tests.

* test: can't import content.search in lms tests

* feat: use SearchAccess in documents and views

* Adds an access_id field to the document, which stores the
  SearchAccess.id for the block's context.
* Use the requesting user's allowed access_ids to filter search results
  to documents with those access_ids.
* Since some users have a lot of individual access granted, limit the
  number of access_ids in the filter to a large number (1_000)
* Updates tests to demonstrate.

* test: can't import content.search or content_staging in lms tests

* fix: make access_id field filterable

* fix: use SearchAccess.get_or_create in signal handlers

In theory, we shouldn't have to do this, because the CREATE and DELETE
events should keep the SearchAccess table up-to-date.

But in practice, signals can be missed (or in tests, they may be
disabled). So we assume that it's ok to re-use a SearchAccess.id created
for a given course or library context_key.

* refactor: refactors the view tests to make them clearer

Uses helper methods and decorators to wrap the settings and patches used
by multiple view tests.

* feat: adds org filters to meilisearch filter

* Uses content_tagging.rules.get_user_orgs to fetch the user's
  content-related orgs for use in the meilisearch filter.
* Limits the number of orgs used to 1_000 to keep token size down

* refactor: removes data migration

Users should use the reindex_studio management command to populate SearchAccess.

* refactor: adds functions to common.djangoapps.student.role_helpers

to allow general access to the user's RoleCache without having to access
private attributes of User or RoleCache.

Related changes:

* Moves some functionality from openedx.core.djangoapps.enrollments.data.get_user_roles
  to this new helper method.
* Use these new helper method in content_tagging.rules

* fix: get_access_ids_for_request only returns individual access

instead of all course keys that the user can read.

Org- and GlobalStaff access checks will handle the rest.

* fix: use org-level permissions when generating search filter

Also refactors tests to demonstrate this change for OrgStaff and
OrgInstructor users.

* refactor: remove SearchAccess creation signal handlers

Lets SearchAccess entries be created on demand during search indexing.

* feat: omit access_ids from the search filter that are covered by the user's org roles

---------

Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
2024-04-17 11:21:34 -07:00
Troy Sankey
f30ae71c23 feat: add more verbose logging around force_enrollment
After testing the enterprise bulk enrollment flow with
force_enrollment=True, I'm finding that the enrollment is still not
forced. This extra logging will hopefully help shed light on where this
boolean might be accidentally ignored.
2024-04-15 08:21:35 -07:00
Omar Al-Ithawi
83f448778a feat!: atlas pull for studio-frontend translations (#34261)
This pull request pulls translations via atlas for `studio-frontend` and refactor `load_sfe_i18n_messages` to load new translations into `conf/plugins-locale/studio-frontend` instead of relying on deprecated node.js package bundled translations.
2024-03-06 15:50:59 +00:00
Zainab Amir
383f5d636a feat: update account verification email context (#34294) 2024-02-27 03:20:15 -08:00
Attiya Ishaque
3a05fd20c6 refactor: Remove unused code for merchandising 2U LOBs (#34230) 2024-02-20 14:03:10 +05:00
Mubbshar Anwar
9fd5157577 fix: update activation email (#34136)
update account activation email message copy in body

VAN-1800
2024-02-20 11:48:50 +05:00