Commit Graph

65817 Commits

Author SHA1 Message Date
Irtaza Akram
d496411f78 fix: delete uwsgi.ini 2024-05-28 13:04:21 +05:00
Irtaza Akram
f7229e0aad chore: replace bleach with nh3 2024-05-28 13:02:16 +05:00
Saad Yousaf
63e940d65d fix: fix and optimize search for Course Notification Preference model on django admin 2024-05-27 14:37:46 +05:00
dependabot[bot]
36da5283c2 build(deps): bump supercharge/mongodb-github-action from 1.7.0 to 1.11.0
Bumps [supercharge/mongodb-github-action](https://github.com/supercharge/mongodb-github-action) from 1.7.0 to 1.11.0.
- [Release notes](https://github.com/supercharge/mongodb-github-action/releases)
- [Changelog](https://github.com/supercharge/mongodb-github-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/supercharge/mongodb-github-action/compare/1.7.0...1.11.0)

---
updated-dependencies:
- dependency-name: supercharge/mongodb-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-27 04:58:12 +00:00
Emad Rad
4529041643 chore: cleanup
- rst heading definitions
- indirect hyperlinks and code-blocks for better readability
2024-05-25 18:08:25 +03:30
Emad Rad
c27d55a253 chore: typos fixed 2024-05-25 18:05:28 +03:30
Emad Rad
db3f7af899 fix: application name corrected 2024-05-25 17:57:02 +03:30
Jansen Kantor
3c94e17706 chore: bump ora to 6.11.1 (#34853) 2024-05-24 13:15:23 -04:00
Ivan Niedielnitsev
699614d892 feat: include units when calculating completion percentage (#34816)
This is an enhancement to the API used for the courseware navigation
sidebar.
2024-05-24 12:59:09 -04:00
Max Sokolski
a96078c1f1 Merge pull request #34807 from raccoongang/max/update-pr-template-redwood
build: nudge devs about Redwood release in github
2024-05-24 20:42:40 +09:00
MueezKhan246
0d01b6d924 Merge pull request #34843 from openedx/MueezKhan246/upgrade-edx-enterprise-be03938
feat: Upgrade Python dependency edx-enterprise
2024-05-24 16:20:03 +05:00
MueezKhan246
865547231b Merge branch 'master' into MueezKhan246/upgrade-edx-enterprise-be03938 2024-05-23 18:40:11 +05:00
MueezKhan246
c9b95568fa refactor: correcting sequence while reverting changes 2024-05-23 13:39:03 +00:00
MueezKhan246
03bcbcdbbb refactor: reverting redundant changes 2024-05-23 13:34:17 +00:00
MueezKhan246
a31375a927 refactor: manually bumping build version 2024-05-23 12:57:24 +00:00
Muhammad Soban Javed
d8675f8a06 feat: add FrontendMonitoringMiddleware in lms and studio (#34823)
* feat: add FrontendMonitoringMiddleware in lms and studio

* chore: upgrade edx-django-utils to 5.14.1
2024-05-23 16:29:59 +05:00
Ahtisham Shahid
cb14a9261a feat: added new v2 for course config api (#34804) 2024-05-23 14:46:44 +05:00
Max Sokolski
d88732fbe0 build: update nudge text for devs
Add link to the Support Development Guidelines
regarding the currently supported releases.
2024-05-23 11:59:55 +03:00
Braden MacDonald
41fa96851f docs: fix minor typos in the meilisearch feature configuration (#34838) 2024-05-22 11:48:27 -07: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
Kyle McCormick
11626148d9 refactor: switch from mock to unittest.mock (#34844)
As of Python 3.3, the 3rd-party `mock` package has been subsumed into the
standard `unittest.mock` package. Refactoring tests to use the latter will
allow us to drop `mock` as a dependency, which is currently coming in
transitively through requirements/edx/paver.in.

We don't actually drop the `mock` dependency in this PR. That will happen
naturally in:

* https://github.com/openedx/edx-platform/pull/34830
2024-05-22 13:52:24 -04:00
Braden MacDonald
749e18bcee fix: don't call signal handlers like XBLOCK_UPDATED before commit (#34800)
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
2024-05-22 10:29:22 -07:00
MueezKhan246
4123e8b7d3 Merge branch 'master' into MueezKhan246/upgrade-edx-enterprise-be03938 2024-05-22 18:41:22 +05:00
Kyle McCormick
69e5fa4227 test: check both dev and prod asset builds using npm run (#34836)
This switches the static asset check over from the deprecated
paver commands to the new 'npm run build' command. Doing so allows us
to check both the prod AND dev build, whereas before we were only
checking the prod build.

Please note that, as before, the "check" is only ensuring that the build
returns 0. It is not checking the contents of the build output.

Closes: https://github.com/openedx/edx-platform/issues/34834
2024-05-22 09:40:37 -04:00
MueezKhan246
9f42093650 feat: Upgrade Python dependency edx-enterprise
removed unencrypted columns of user data credentials in blackboard config ENT 8010

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2024-05-22 13:32:13 +00:00
David Ormsbee
be03938377 refactor: update to use Learning Core's new public API
This also bumps our openedx-learning dependency to 0.10.0 (the first
version with the new openedx_learning.api package).
2024-05-21 16:05:56 -04:00
Kyle D. McCormick
f820961de5 test: actually unit test and lint remaining pavelib modules
We haven't unit-tested or linted these modules ever since testing was
moved from Jenkins to GitHub Actions.
2024-05-21 15:14:38 -04:00
Kyle D. McCormick
e64becbdf0 test: fix remaining paver tests
They haven't been run in CI in years, and had gradually become broken
2024-05-21 15:14:38 -04:00
Kyle D. McCormick
c4a1f800e9 feat!: remove paver docs, i18n, servers, and pylint
This is the first step of Paver removal.
These are the parts that we are confident are unused.

Part of: https://github.com/openedx/edx-platform/issues/34467
2024-05-21 15:14:38 -04:00
Alexander J Sheehan
5c3dd11c6a Merge pull request #34831 from openedx/asheehan-edx/enterprise-version-bump-4.19.3
feat: bumping edx-enterprise version to 4.19.3
2024-05-21 14:16:22 -04:00
Chris Chávez
0295d60332 perf: Bump version of openedx-learning for taxonomy import improvements (#34796) 2024-05-21 11:01:25 -07:00
Alexander J Sheehan
2812a706f2 feat: bumping edx-enterprise version to 4.19.3 2024-05-21 17:36:17 +00:00
Ahtisham Shahid
362899e797 fix: Added message to Course update notification in case of small text (#34819) 2024-05-21 13:31:41 +05: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
Hamzah Ullah
e7b4db0862 chore: Upgrade edx-enterprise to 4.19.1 (#34822) 2024-05-20 15:34:35 -04:00
Maria Grimaldi
9431e96d3c fix: add in-line docs correct namespace for content_groups_for_teams (#34783) 2024-05-20 14:50:17 -04:00
Maria Grimaldi
33b8137763 refactor: rename minimum partition ID constant to be more generic (#34529)
Rename MINIMUM_STATIC_PARTITION_ID to MINIMUM_UNUSED_PARTITION_ID
so it's not confusing when used to generate IDs for static or dynamic
partitions.
2024-05-20 14:38:58 -04:00
Hamzah Ullah
031df2dbd3 chore: Upgrade edx-enterprise to 4.19.0 (#34821) 2024-05-20 10:11:10 -04:00
Arslan Ashraf
9c485dddd6 fix: make lis_person_contact_email_primary matching case-insensitive 2024-05-17 20:21:32 +02:00
Glenn R. Martin
73231eda86 Merge pull request #34818 from openedx/gmartin/cc-logging
fix: adding additional logging to commerce handle_refund_order
2024-05-17 12:22:08 -04:00
Glenn R. Martin
20c8fc127b fix: logging emission of REFUND_ORDER 2024-05-17 11:55:47 -04:00
Glenn R. Martin
a9b14e8b16 fix: adding additional logging to commerce handle_refund_order 2024-05-17 11:21:59 -04:00
David Ormsbee
4c0623bcbc fix: prevent setting user attributes from JWT in Studio
Open edX implements its a JwtAuthentication class in edx-drf-extensions
(in edx_rest_framework_extensions.auth.jwt.authentication). This class
updates the local User database entry to match certain values in the
token. It's used as a way to automatically provision and update users
with their LMS user information on other Open edX services like
ecommerce.

Since LMS and Studio keep the record of truth in its database tables,
they should *not* update their database user information based on the
JWT. Doing so would allow stale JWTs to incorrectly reset user values
after they had been changed in the LMS. This is done by having the
EDX_DRF_EXTENSIONS['JWT_PAYLOAD_USER_ATTRIBUTE_MAPPING'] setting be an
empty dictionary, and was set correctly for the LMS in its common.py env
settings module. Unfortunately, this was *not* being set for Studio.

This commit adds the same setting to Studio's common settings module.
Prior to this commit, it was possible for a stale JWT to reset user
attributes if the user hit a Studio API endpoint that used JWT for  auth
(e.g. endpoints used by the Course Authoring MFE). This opened up a
potential security issue where a global staff user (is_staff=True) that
had their global staff status removed (is_staff=False) could have up to
a one hour window in which they could use their stale-but-still-valid
global-staff JWT token to regain global staff status by calling a Studio
endpoint with their browser.
2024-05-17 10:01:10 -04:00
qasim.gulzar
48cdbce893 refactor: [DEPR]: Neo4J Support #34342 2024-05-17 18:55:16 +05:00
Alexander J Sheehan
e33e30ca85 Merge pull request #34814 from openedx/asheehan-edx/edx-enterprise-version-bump-4.18.6
chore: bumping enterprise package version to 4.18.6
2024-05-16 15:49:50 -04:00
Alexander J Sheehan
997f28c25b chore: bumping enterprise package version to 4.18.6 2024-05-16 19:18:28 +00:00
Kyle McCormick
51274af916 fix: use the correct environment variable in watch_sass (#34805)
EDX_PLAFORM_THEME_DIRS was the original name,
but it was changed to COMPREHENSIVE_THEME_DIRS
in https://github.com/openedx/edx-platform/pull/34700.
2024-05-16 15:08:05 -04:00
Raymond Zhou
0fd3bde79d fix: remove instructor info serializer validation (#34802) 2024-05-16 13:47:07 -04:00
Justin Hynes
9fbc6e3bf4 feat: purge name from certificate records during user retirement (#34799)
[APER-3241]

This PR updates the retirement pipeline to purge learners' names from certificate records when their account is being retired.

It also introduces a new management command that can be used by Open edX operators to purge the leftover name data (PII data) from the `certificates_generatedcertificate` table. This is designed as a one-time use data fixup, as the retirement functionality should clean this moving forward.
2024-05-16 09:17:40 -04:00
Muhammad Adeel Tajamul
7709f4b2c6 fix: updated email notifications task and ui fixes (#34803) 2024-05-16 05:18:59 +05:00