Commit Graph

10451 Commits

Author SHA1 Message Date
Zachary Hancock
4b827bf9be feat: show error on courses with unknown proctoring providers (#35445) 2024-09-10 09:02:13 -04:00
Alison Langston
e498d2087d fix: allow courses to render with invalid proctoring provider (#35430) 2024-09-09 10:51:06 -04:00
Kaustav Banerjee
79fb1cc404 fix: hide new library button for ineligible users in split studio view (#35316) 2024-09-06 11:21:56 -07:00
Tim McCormack
b615a8767f feat: Convert contentserver to view permanently (drop middleware and flag) (#35420)
Final planned portion of https://github.com/openedx/edx-platform/issues/34702 -- waffle flag and middleware are removed.

Commits:

1. Feature change
    - Delete `content_server.use_view` waffle flag in favor of always using view
    - Delete the husk of `StaticContentServerMiddleware` and references to it
    - Update views module docstring
2. Refactor (move)
    - Move contentserver implementation into views.py
3. Lint cleanup
    - Fix import ordering (from refactor debris + amnestied lint)
2024-09-06 14:42:32 +00:00
Braden MacDonald
4a12de7851 refactor: remove unused JS requirement in CMS (#34545) 2024-09-03 10:40:32 -07:00
Robert Raposa
01c718dfb2 Revert "feat: DEPR USE-JWT-COOKIE header (#35393)" (#35397)
This reverts commit 1c2b804ef7.
2024-08-29 11:23:05 -04:00
Muhammad Adeel Tajamul
481a50717a feat: updated content in course_update notification (#35373) 2024-08-29 18:07:57 +05:00
Robert Raposa
1c2b804ef7 feat: DEPR USE-JWT-COOKIE header (#35393)
This repo is no longer using USE-JWT-COOKIE header,
since it has the required edx-drf-extensions>10.2.0,
where it was fully removed.

This is final clean-up for this repo.

See "[DEPR]: USE-JWT-COOKIE header" for more details:
- https://github.com/openedx/edx-drf-extensions/issues/371
2024-08-29 08:27:47 -04:00
Rômulo Penido
5fbcc794cf feat: add collections app from openedx-learning (#35312) 2024-08-23 14:33:31 +09:30
Kristin Aoki
36a3b0ba81 Revert "fix: update course discussion config before course load (#35219)" (#35349)
This reverts commit 5c0942481c.
2024-08-22 19:49:21 +00:00
Muhammad Farhan Khan
375b9d9286 feat: Expose xmodule xblocks Sass variables as vanilla CSS variables (#35233)
* feat: Expose xmodule xblocks Sass variables as vanilla CSS variables
* https://github.com/openedx/edx-platform/issues/35173
2024-08-20 20:05:02 +05:00
Ahtisham Shahid
5c0942481c fix: update course discussion config before course load (#35219)
fix: update course discussion config before course load

fix: updated unit tests

fix: resolved content issue in renamed notification
2024-08-12 07:53:55 +00:00
Ahtisham Shahid
9bd692413a fix: make course update email pref false (#35224)
fix: updated unit tests

fix: updated unit tests
2024-08-07 14:55:02 +05:00
Eemaan Amir
085a2f5815 refactor: deprecated course update notification waffle flag (#35190) 2024-07-30 11:57:51 +05:00
Kristin Aoki
8d0ada54c4 feat: add waffle flag for beta testing new problem editor parser (#35184)
* feat: add waffle flag for beta testing new problem editor parser

* chore: remove commented out code

* fix: failing test
2024-07-26 12:00:42 -04:00
Daniel Valenzuela
78b691b56a refactor: inheritable authoring mixin callbacks for editing & duplication (#33756) 2024-07-25 10:30:37 -07:00
Feanil Patel
1fa8e07f1c style: Fix a pylint and other style violations. 2024-07-25 11:06:17 -04:00
connorhaugh
25437d2a72 docs: imporved comment 2024-07-25 10:12:16 -04:00
connorhaugh
df635e0fae fix: libraries across orgs 2024-07-25 10:12:16 -04:00
Muhammad Adeel Tajamul
e12ec1b153 feat: added group_by_id field in notifications model (#35137) 2024-07-23 14:28:56 +05:00
Deborah Kaplan
58de0964ca feat: removing visible_date-to-creds updates per-cert (#35113)
* feat: removing visible_date-to-creds updates per-cert

The credentials IDA now relies on  the course certificate configuration
and (if present) `certificate_available_date` for displayability. We no
longer need to send `visible_date` updates for every awarded certificate
when a course  overview changes.
2024-07-17 08:43:12 -04:00
muhammad-ammar
6a04752005 feat: use xpert ai 2024-07-04 18:17:02 +05:00
github-actions[bot]
6945bfae61 feat: Upgrade Python dependency edx-enterprise (#35046)
* feat: Upgrade Python dependency edx-enterprise

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

* fix: one space to force push

---------

Co-authored-by: kiram15 <31229189+kiram15@users.noreply.github.com>
Co-authored-by: Kira Miller <kira.miller15@yahoo.com>
2024-06-27 14:42:00 -06:00
hajorg
cf6c55a9aa feat: get youtube videos edx_video_id for a course 2024-06-21 08:49:16 +01:00
Isaac Lee
76fbcbe437 fix: also filter for show_dashboard for instructor (#34949)
* fix: also filter for show_dashboard for instructor

* temp: attempting to craft tests

* chore: lint

* test: fixed xblock tests
2024-06-18 15:13:01 -04:00
Muhammad Qasim Gulzar
dfb09bbf4f fix: Unexpected "Copied_from_block" field in Advanced Settings (#34472)
Closes https://github.com/openedx/edx-platform/issues/34370
2024-06-17 11:14:15 -04:00
Feanil Patel
ff4d084e8b fix: Update to adjust for new scipy.stats.mode behavior.
Previously the default for the `keepdims` parameter was True, but as of
SciPy 1.11.0 it is false. This is actually the behavior we want here
since we only care about the mode value and not other values.

https://docs.scipy.org/doc/scipy/release/1.11.0-notes.html#expired-deprecations
2024-06-11 11:30:22 -04:00
Tim McCormack
0eb61e28d1 feat: Start conversion of StaticContentServer from middleware into view (#34703)
See https://github.com/openedx/edx-platform/issues/34702

This necessarily involves switching from calling
`StaticContent.is_versioned_asset_path` to determine whether to handle the
request to having a hardcoded urlpattern. I've made the choice to hardcode
the other two patterns similarly rather than using imported constants. The
mapping of URL patterns to database records should be explicit (even though
we don't expect those constants to change out from under us.)

I've renamed the middleware rather than choosing a new name for the
implementation because there are other references in tests and other code.
This was the smaller change.

A note on HTTP methods: The middleware currently completely ignores the
request's HTTP method, so I wanted to confirm that only GETs were being
used in practice. This query reveals that 99.8% of requests that this
middleware handles are GET, with just a smattering of PROPFIND and OPTIONS
and a tiny number of HEAD and POST:
```
from Transaction select count(*) facet request.method
where name = 'WebTransaction/Function/openedx.core.djangoapps.contentserver.middleware:StaticContentServer'
since 4 weeks ago
```
2024-06-10 15:44:46 +00:00
Raymond Zhou
f3413fd767 fix: video page api error 2024-05-31 15:15:11 -04:00
Artur Gaspar
90fc5f8dbf feat: open new editors from non-unit Studio container page (#33575)
Make the edit button on a container page for a non-unit block
(i.e. an individual text, problem or video block) open the new
editor when the relevant flag is enabled.
2024-05-31 11:30:59 -04:00
Kristin Aoki
1ef4c0d7a2 fix: add missing end field (#34880)
* fix: add missing end field

* fix: lint and test errors
2024-05-31 09:42:53 -04:00
Kristin Aoki
38320f8433 feat: grading rest api for authoring api (#34854)
* feat: grading rest api for authoring api

* fix: doc string api path
2024-05-29 14:54:00 -04:00
Alison Langston
791e317085 feat: update timeout for course reindexing (#34866) 2024-05-28 15:31:05 -04:00
Feanil Patel
4085066fea Merge pull request #34417 from qasimgulzar/qasim/DEPR/git-issue-34342
[DEPR]: Remove Neo4J Support #34342
2024-05-28 10:25:33 -04: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
Braden MacDonald
41fa96851f docs: fix minor typos in the meilisearch feature configuration (#34838) 2024-05-22 11:48:27 -07: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
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
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
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
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
Raymond Zhou
0fd3bde79d fix: remove instructor info serializer validation (#34802) 2024-05-16 13:47:07 -04:00
Raymond Zhou
74a514518c fix: instructor info in course details api (#34760) 2024-05-13 12:47:22 -04:00
ABBOUD Moncef
3fa77ea44d feat: add a nontranslated status video field (#33939) 2024-05-13 09:58:01 -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
Glib Glugovskiy
4599e45b2e feat: emit passing status updated events for badging (#34749)
Introduce emission of the COURSE_PASSING_STATUS_UPDATED as well as CCX_COURSE_PASSING_STATUS_UPDATED events, that are groundwork for the new Credly integration and the future badging initiative.

Product GH ticket for tracking - openedx/platform-roadmap#280
2024-05-09 11:52:36 -04:00
Rômulo Penido
b42da7429f feat: Enable taxonomy/tagging feature in MFE by default (#34633)
* feat: make tagging feature enabled by default

* fix: use the correct flag for tagging enabled

* fix: make compatible with other changes from master

* fix: more compatibility fixes

* fix: show tag counts at all levels of the outline, not just units

* chore: typo

* test: fix counts in test suite now that tagging is on by default

---------

Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
2024-05-09 18:57:05 +05:30
Chris Chávez
6738faa8f7 feat: Avoid to close tag drawer when click outside (#34740) 2024-05-09 17:29:21 +05:30