Commit Graph

6502 Commits

Author SHA1 Message Date
Ahtisham Shahid
ad513cbd23 fix: removed course_id from notification flag implementation (#37716) 2025-12-03 16:38:17 +05:00
Stanislav
82f574ec2c feat: Replace Twitter with X (#36524)
* feat: Replace Twitter with X


---------

Co-authored-by: Turchanikov Arsen <arsen.turchanikov@raccoongang.com>
2025-12-02 10:43:26 -05:00
Ahtisham Shahid
c8e6a760f9 feat: add grouping for new response notification (#37674) 2025-12-02 15:21:36 +05:00
Samuel Allan
31e04c9e56 docs: add initial documentation for notifications
- Document the types used in
  COURSE_NOTIFICATION_TYPES and COURSE_NOTIFICATION_APPS.
- Port the wiki page on creating a new notification to the docs here.
- Add some miscellaneous docs and placeholder TODO notes.
- Add a data flow diagram.
- Add a short getting started guide for operators
  (mainly for getting email notifications working).

Private-ref: https://tasks.opencraft.com/browse/BB-10065
2025-11-28 11:45:04 +05:30
Navin Karkera
562978990a feat: store information for failed block migrations (#37691)
* Updates `ModulestoreBlockMigration` table to allow storing `null` values in `target` field for blocks that failed to migrate/import.
* Adds `unsupported_reason` field to store reason for failure.
* Add number of children blocks in failed block `unsupported_reason` field. 
* Fixes issue with blocks like `openassessment` where `url_name` field is not included in its olx during serialization.
2025-11-27 12:39:20 -05:00
Daniel Wong
41acf0eb52 feat: include user and origin_server info in library archive (#37626) 2025-11-19 22:42:27 -05:00
Feanil Patel
7023d76e98 Merge pull request #37289 from Stoorx/customizable-username-min-length
feat: Make `USERNAME_MIN_LENGTH` customizable
2025-11-19 15:34:04 -05:00
github-actions[bot]
122b4e072d [FC-0099] feat: Upgrade Python dependency openedx-authz (#37652)
* feat: Upgrade Python dependency openedx-authz

handle cache invalidation

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

* fix: update the num of queries in tests

---------

Co-authored-by: MaferMazu <35668326+MaferMazu@users.noreply.github.com>
Co-authored-by: Maria Fernanda Magallanes Zubillaga <maria.magallanes@edunext.co>
2025-11-19 14:34:20 -05:00
Feanil Patel
1a7d985a5d Merge pull request #37590 from openedx/feanil/enable_edx_oauth2
feat: Drop the ENABLE_OAUTH2_PROVIDER flag.
2025-11-18 13:26:07 -05:00
Chris Chávez
b9e5683b67 fix: Publish components/container in legacy libraries migration (#37644)
- Fix the issue described in https://github.com/openedx/frontend-app-authoring/issues/2626
- Publish components and containers after migrate
2025-11-18 17:20:28 +00:00
Feanil Patel
93bb80bd26 Merge pull request #37385 from openedx/feanil/drop_name_affirmation
feat!: Drop edx-name-affirmation as a dependency.
2025-11-17 10:37:43 -05:00
Muhammad Farhan Khan
a50ab7d75f chore: Move waffle flags, configs (used in video block) to video service
Merge pull request #37631 from openedx/farhan/add-waffle-flags
2025-11-17 17:52:29 +05:00
Muhammad Farhan Khan
f51343c871 refactor: move transcripts_utils from xmodule to video-config (#37600)
As part of the ongoing effort to deprecate and eventually remove xmodule,
we’ve started gradually migrating the necessary code files from xmodule
to more appropriate locations within the codebase.

Ticket: https://github.com/openedx/public-engineering/issues/445

Also: this tweaks importlinter ignores & add follow-up issue links

Co-authored-by: Kyle McCormick <kyle@axim.org>
2025-11-14 18:26:35 +00:00
Chris Chávez
fcf03cc710 feat: get migrations info REST-API added [FC-0112] (#37558)
- Adds the get migrations info REST-API.
- Add missing title to CourseDetails population.
2025-11-14 17:38:40 +00:00
María Fernanda Magallanes
f4f14a6987 [FC-0099] feat: add openedx-authz to library apis user_can_create_library and require_permission_for_library_key (#37501)
* feat: add the authz check to the library api function

feat: add the authz publish check in rest_api blocks and containers

feat: add the authz checks in libraries and refactor

feat: add collections checks

feat: update enforcement in serializer file

refactor: refactor the permission check functions

fix: fix value error

fix: calling the queries twice

* test: add structure for test and apply feedback

refactor: refactor the tests and apply feedback

fix: apply feedback

Revert "refactor: refactor the tests and apply feedback"

This reverts commit aa0bd527dd7bc7dec4a7ad7adb41a3c932f4a587.

refactor: use constants and avoid mapping

test: fix the test to have them in order

docs: about we rely on bridgekeeper and the old check for two cases

docs: update openedx/core/djangoapps/content_libraries/api/libraries.py

Co-authored-by: Maria Grimaldi (Majo) <maria.grimaldi@edunext.co>

refactor: use global scope wildcard instead of *

refactor: allow receiving PermissionData objects

refactor: do not inherit from BaseRolesTestCase to favor CL setup methods

If both BaseRolesTestCase and ContentLibrariesRestApiTest define a method
with the same name (e.g., setUp()), Python will use the one found first
in the MRO, which is the one in BaseRolesTestCase because it is
listed first in the class definition leading to unexpected behavior.

refactor: remove unnecessary imports and indent

* chore: bump openedx-authz version
2025-11-13 12:41:40 -05:00
Maria Grimaldi (Majo)
6c6fc5d551 [FC-0099] feat: filter libraries based on user-role scopes (#37564) 2025-11-13 16:33:13 +01:00
Chris Chávez
4804c980d4 fix: Call LIBRARY_CONTAINER_PUBLISHED for parent of containers (#37622)
Calls `LIBRARY_CONTAINER_PUBLISHED` when publishing a container that is child of another container.
2025-11-12 18:58:49 +00:00
Muhammad Farhan Khan
7b953a5310 refactor: Introduce VideoConfig service, move video sharing methods in it
refactor: Introduce VideoConfig service, move video sharing methods in it
2025-11-11 17:59:36 +05:00
farhan
0cd62bf786 refactor: Introduce VideoConfig service, move video sharing methods in it 2025-11-11 12:55:02 +05:00
David Ormsbee
190a8b8160 fix: bump learning-core to 0.30.0 (#37614)
This pulls in publishing dependency changes from:
https://github.com/openedx/openedx-learning/pull/369

This fixes a bug where publishing a Content Library v2 container would
publish only its direct children instead of publishing all ancestors.

Co-authored-by: Kyle McCormick <kyle@axim.org>
2025-11-07 17:00:50 +00:00
edX requirements bot
baa948135d chore: Upgrade Python requirements (#37608) 2025-11-05 16:34:37 +00:00
Feanil Patel
92a47097b7 feat: Drop the ENABLE_OAUTH2_PROVIDER flag.
This setting was not actually not changing installation behavior, that
is being set by whether oauth_dispatch is in INSTALLED_APPS or not.

This flag was being used to:

* Hide enable/disable certain URL paths.
    * We need these paths on all the time in the LMS because all other
      services and MFE rely on oauth to authenticate with the LMS so we
      just end up turning this on later in the settings stack.

* We use it to only run certain oauth_dispatch tests in the LMS test
  environment because the oauth_dispatch app is not installed in the
  CMS.
    * We use the `skip_unless_lms` decorator now instead to do this or
      just run the tests in both suites because they are valid tests in
      both contexts.
2025-11-03 12:54:06 -05:00
Feanil Patel
86032c19a0 test: Remove tests that rely on edx-name-affirmation service being installed
The service is specific to 2U and should not be installed by default.  When we
try to patch objects from that library, that can only be done if the
original object is importable.  So those tests don't make sense to have
in the base system which you should be able to run without the
edx-name-affirmation library.
2025-10-30 14:31:06 -04:00
Braden MacDonald
4690913a04 feat: remove "experimental" param from reindex_studio (#37546) 2025-10-29 13:52:06 -07:00
Kyle McCormick
834cb9482d refactor: rename ModuleStore runtimes now that XModules are gone (#35523)
* Consolidates and renames the runtime used as a base for all the others:
  * Before: `xmodule.x_module:DescriptorSystem` and
            `xmodule.mako_block:MakoDescriptorSystem`.
  * After:  `xmodule.x_module:ModuleStoreRuntime`.

* Co-locates and renames the runtimes for importing course OLX:
  * Before: `xmodule.x_module:XMLParsingSystem` and
            `xmodule.modulestore.xml:ImportSystem`.
  * After:  `xmodule.modulestore.xml:XMLParsingModuleStoreRuntime` and
            `xmodule.modulestore.xml:XMLImportingModuleStoreRuntime`.
  * Note: I would have liked to consolidate these, but it would have
          involved nontrivial test refactoring.

* Renames the stub Old Mongo runtime:
  * Before: `xmodule.modulestore.mongo.base:CachingDescriptorSystem`.
  * After: `xmodule.modulestore.mongo.base:OldModuleStoreRuntime`.

* Renames the Split Mongo runtime, the which is what runs courses in LMS and CMS:
  * Before: `xmodule.modulestore.split_mongo.caching_descriptor_system:CachingDescriptorSystem`.
  * After: `xmodule.modulestore.split_mongo.runtime:SplitModuleStoreRuntime`.

* Renames some of the dummy runtimes used only in unit tests.
2025-10-29 15:46:07 -04:00
Maria Grimaldi (Majo)
31b1e6ecc4 [FC-0099] feat: assign library roles after successful library creation (#37532) 2025-10-29 20:29:02 +01:00
Tarun Tak
18d5abb2f6 chore: Replace pytz with zoneinfo for UTC handling - Part 1 (#37523)
First PR to replace pytz with zoneinfo for UTC handling across codebase.

This PR migrates all UTC timezone handling from pytz to Python’s standard
library zoneinfo. The pytz library is now deprecated, and its documentation
recommends using zoneinfo for all new code. This update modernizes our
codebase, removes legacy pytz usage, and ensures compatibility with
current best practices for timezone management in Python 3.9+. No functional
changes to timezone logic - just a direct replacement for UTC handling.

https://github.com/openedx/edx-platform/issues/33980
2025-10-28 16:23:22 -04:00
Daniel Wong
6deb4f8d05 fix: add to search index when creating library from archive (#37526)
Implement full re-index process when creating a library.
2025-10-27 17:53:07 -04:00
Navin Karkera
8aaae4604a fix: index and entity link sync issues on parent block deletion (#37541)
Meilisearch index documents were not synced properly when any block with children blocks like units, subsections, sections etc. were being deleted as the `XBLOCK_DELETED` is only triggered for the deleted block.
This PR fixes it by deleting all index documents that contain the deleted block in its `breadcrumbs` field as only blocks that are children of this block will have it its breadcrumbs field.

Similarly, the entity links that store links between course and library blocks was not synced properly due to children `ContainerLinks` not being deleted.
2025-10-27 13:44:36 -05:00
Deborah Kaplan
121fee3035 feat: display the reset toggles for a report (#37556)
One retirement partner status report admin toggle has  being renamed,
and another has been added. This PR displays them on the appropriate
django admin page.
2025-10-27 17:25:38 +00:00
Deborah Kaplan
3dc96a97e9 feat: allows a reversion of the retirement partner report reset toggle (#37539)
* feat: allows a reversion of the  retirement partner report reset toggle

This allows you to set retirement partner report statuses to True as well as to False. One sample use case: if an overly large number of retirement partner reports have their status reset to false, the partner report queue can struggle to deal with the large queue.

FIXES: APER-4177
2025-10-24 17:07:40 +00:00
Taimoor Ahmed
86d9b08b5d feat: remove last cs_comments service references (#37503)
This commit removes all remaining references to cs_comments_service
except the ForumsConfig model. The only purpose of keeping the model
and table around is so that the webapp processes don't start throwing
errors during deployment because they're running the old code for a
few minutes after the database migration has run. We can drop
ForumsConfig and add the drop-table migration after Ulmo is cut.

Also bumps the openedx-forum version to 0.3.7

---------

Co-authored-by: Taimoor  Ahmed <taimoor.ahmed@A006-01711.local>
2025-10-23 10:48:39 -04:00
Taylor Payne
bf8ffe4cf7 feat: add library restore endpoint (#37439)
Adds a library restore endpoint to restore a learning package from a
backup zip archive (/api/libraries/v2/restore/). The learning package
can then be used to create a content library.
2025-10-22 08:30:18 -04:00
Rodrigo Mendez
9ee599005b fix: always return an absolute url in libraries backup endpoint (#37508)
The 'url' field on the GET /api/libraries/v2/{library_id}/backup/?task_id={task_id}
endpoint was returning realtive paths when the file was stored on the default
FileSystemStorage backend, which makes it inconsistent with other storage
backends and semantically incorrect.

This commit addresses this making sure it always returns an absolute url.
2025-10-20 19:48:33 -04:00
Chris Chávez
3f5ac6ddbc fix: Update on_commit_changes_to of modulestore to check MySQL transaction [FC-0097] (#37485)
- `handle_update_xblock_upstream_link` is called asynchronously with celery. In `update_upstream_downstream_link_handler`, the xblock has the updated version, but when calling `handle_update_xblock_upstream_link` inside Celery, the xblock is outdated in a previous version, which is why the error occurs. This happens because `on_commit_changes_to` is executed before the MySQL transaction ends.
- Added `ImmediateOnCommitMixin` to be used in tests that need to call `on_commit_changes_to`. See https://github.com/openedx/edx-platform/pull/37485#issuecomment-3412979170  for more info
2025-10-20 17:02:04 -05:00
David Ormsbee
f7a1a9d990 feat!: remove version from library serializer
The ContentLibraryMetadata used to hold a version field that was meant
to represent the version of the library as a whole. This is a holdover
from v1 libraries, where all changes to the library resulted in a new
version of the content, and that version indicator was used by courses
to know whether or not an update was available.

This maps poorly to Learning Core backed libraries for a number of
reasons:

1. LC-backed libraries have Draft and Published branches, meaning that
   a global "version" may be ambiguous.
2. LC-backed libraries have things like tagging and collections, where
   modifications are explicitly *not* versioned at all, and do not show
   up in either the publish log or the draft change log.
3. Courses that borrow content from LC-backed libraries track
   versioning at the level of the individual thing being borrowed, e.g.
   a single Component. This is in keeping with the goal to have very
   large libraries with many small bits of content to search and use.

This commit removes the notion of a Library-global version entirely for
v2 (LC-backed) libraries. This does not affect legacy v1 libraries that
are backed by ModuleStore.
2025-10-20 11:11:46 -04:00
Tobias Macey
0fdb6ed2fe fix: Convert UUIDField columns to uuid type for MariaDB (#37494)
The behavior of the MariaDB backend has changed behavior for UUIDField
from a `CharField(32)` to an actual `uuid` type. This is not converted
automatically, which results in all writes to the affected columns to
error with a message about the data being too long. This is because the
actual tring being written is a UUID with the `-` included, resulting in
a 36 character value which can't be inserted into a 32 character column.
2025-10-20 10:32:44 -04:00
Rômulo Penido
e2526cfb9b feat: intra library container copy [FC-0097] (#37483)
Allows pasting sections and subsections in libraries, adding support for intra-library copy and paste
2025-10-17 12:14:24 -05:00
Feanil Patel
3abfeb24ca test: Switch the library test to use problem instead of html.
Since we're removing the studio implementation of the html block, update
the library test that was using it to use the problem block instead.
2025-10-16 15:01:36 -04:00
Raymond Zhou
da2daf255e feat: future proof artifact uploads (#37464) 2025-10-14 18:32:48 -04:00
Feanil Patel
fc374e7dfa Merge pull request #37474 from openedx/fix-assert-dict-contains-subset-depr
fix: replace deprecated assertDictContainsSubset()
2025-10-14 13:42:51 -04:00
usamasadiq
8aa2970c51 fix: fix pycodestyle error 2025-10-13 22:53:37 +05:00
usamasadiq
8a2c451439 fix: replace deprecated assertDictContainsSubset() 2025-10-12 11:10:36 +05:00
farhan
dc074d57cd chore: Move sharing_sites into video_configuration app
- https://github.com/openedx/edx-platform/issues/37456
2025-10-10 17:25:39 +05:00
Taimoor Ahmed
4c051378d0 feat!: remove last calls to cs_comments_service (#37376)
This removes the last remaining code that called out to the
cs_comments_service. All forums backend logic now uses the v2 API from
the forum repo (https://github.com/openedx/forum). This does NOT remove
MongoDB support.

This also implements the endpoint to retrieve all comments for a user
using the new forum backend. This is not actually called from any known
frontend code, but it has not been formally deprecated as an endpoint,
and therefore needs to be supported.

As part of the cleanup, the ENABLE_FORUM_V2 course waffle flag has also
been removed, along with all remaining switching logic that used to
route between the Python API in the forum repo and service calls to the
cs_comments_service Ruby service.

Other endpoints affected (switching logic removed):

* get course commentable counts
* get/update course user stats
* update comment/thread/user
* delete thread (implementation moved to forum repo)
* follow
* retire user

This is part of the following overall DEPR ticket:
  https://github.com/openedx/cs_comments_service/issues/437
2025-10-08 11:36:52 -04:00
Abdul-Muqadim-Arbisoft
e5b497cbba fix: prevent None entrance_exam_minimum_score_pct from breaking CourseOverview sync (#37339)
* fix: prevent None entrance_exam_minimum_score_pct from breaking CourseOverview sync

When entrance exams are disabled in Studio, the field
`entrance_exam_minimum_score_pct` was set to `None`. This caused silent failures
when saving `CourseOverview` because the database column requires a float (NOT NULL).

This patch ensures that:
- CourseOverview sanitizes None values by falling back to
  `settings.ENTRANCE_EXAM_MIN_SCORE_PCT` (default=50).
- Studio avoids writing `None` and instead applies the configured default.

Impact:
- Prevents IntegrityErrors and silent failures when updating course settings.
- Restores proper syncing between modulestore (Mongo) and CourseOverview (MySQL).
- Fixes reported issues such as display name changes not persisting and course
  start dates not syncing.

Closes: https://github.com/openedx/edx-platform/issues/37319#

* refactor: clean up entrance_exam_minimum_score_pct handling

- Consolidate logic to avoid repeated assignments
- Centralize None fallback and int/float normalization
- Improve readability with inline comment and consistency with Open edX style

* test: update entrance exam deletion test to expect default min score

- Adjusted `test_entrance_exam_created_updated_and_deleted_successfully` to check for
  `settings.ENTRANCE_EXAM_MIN_SCORE_PCT` instead of `None` after exam deletion
- Added handling for both int and float defaults (`/100` for integer case)
2025-10-08 15:26:00 +05:00
Haftamu Kebede
e46cfa6b32 feat: Certificate sharing to linkedin (optionally) consider course level organization name (#37331)
By adjusting social media sharing settings(specifically linkedin) certificate parameters are autopopulated to LinkedIn API. Additional setting parameters(such as CERTIFICATE_LINKEDIN_DEFAULTS_TO_COURSE_ORGANIZATION_NAME) are introduced to override existing(platform level parameter for organization name) parameters for an operator to configure course level organization name. This will enable learners to share certificate in to LinkedIn with an option for course associated organization to be autopopulated.
2025-10-07 16:02:08 -04:00
Rodrigo Mendez
0c9997ce92 feat: Implementation of library v2 backup endpoints 2025-10-06 18:13:02 -04:00
Feanil Patel
c0ce868365 Merge pull request #37380 from openedx/feanil/move_user_util
feanil/move user util
2025-10-06 10:37:14 -04:00
Braden MacDonald
245b861e01 fix: reindex_studio could crash if an XBlock child isn't loadable (#37177)
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
2025-10-02 18:22:28 -07:00