Commit Graph

6470 Commits

Author SHA1 Message Date
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
Maxwell Frank
7fc88d5a25 feat: extend program dash endpoint to b2c (#37387) 2025-10-01 11:38:05 -04:00
Chris Chávez
51bfd3febe feat: Add blockType to xblockPreview & title to xblock_iframe [FC-0097] (#37362)
- Adds `blockType` and `is_modified` to the `showXBlockLibraryChangesPreview` iframe message.
- Add title to the `xblock_iframe`
- Add `is-modified` to `studio_xblock_wrapper`
- Add `disable_staff_debug_info` as a query param in `render_xblock`
- `downstream_is_modified` added to ComponentLink and ContainerLink
2025-09-29 23:27:32 +00:00
Muhammad Arslan
51ac947caf fix: always generate block structure from "published-only" branch (#37335)
Block structures are meant to be an optimization for the LMS, meaning
that they should always be collecting from the published branch of
modulestore. This is what happens by default when it's run from the LMS
celery process, but this code is sometimes invoked from a Studio worker
(e.g. development mode celery, running in immediate in-proc mode).

---------

Co-authored-by: Peter Pinch <pdpinch@mit.edu>
2025-09-26 20:58:12 -04:00
Kyle McCormick
7275ce1634 feat!: modulestore_migrator (#36873)
This introduces the modulestore_migrator app, which can be
used to copy content (courses and libraries) from modulestore
into Learning Core. It is currently aimed to work on the legacy
library -> v2 library migration, but it will be used in the future
for course->library and course->course migrations.

This includes an initial REST API, Django admin interface,
and Python API.

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

Requires some follow-up work before this is production-ready:
https://github.com/openedx/edx-platform/issues/37259

Co-authored-by: Andrii <andrii.hantkovskyi@raccoongang.com>
Co-authored-by: Maksim Sokolskiy <maksim.sokolskiy@raccoongang.com>
2025-09-24 11:02:05 -04:00
Feanil Patel
8a7665697a fixup! refactor: Move user_util library to edx-platform 2025-09-22 15:55:17 -04:00
Feanil Patel
89d72074fd refactor: Move user_util library to edx-platform
The library consisted of this set of utilities and a cli and was only
being used in the edx-platform repo.  The CLI will be DEPRed along with
the repo but the code that is being used for retirement will be moved
here.
2025-09-22 15:39:56 -04:00
Feanil Patel
f120a7cac5 Merge pull request #37067 from WGU-Open-edX/collapse-features-dictionary
refactor: flatten FEATURES dictionary with backward compatible proxy
2025-09-18 10:39:48 -04:00
Kaustav Banerjee
6b48ff9470 feat: add ability to override middlewares for recurring nudges
* feat: add ability to override middlewares for recurring nudges

* feat: add ability to run command for all sites
2025-09-17 21:52:39 +05:30
Navin Karkera
a11086ffac feat: allow editing imported text blocks (#37124)
* feat: allow editing html block imported from upstream

The modified field is left untouched in future sync while storing the
upstream values in hidden fields to allow authors to revert to upstream
version at any point.

* fix: sync downstream_customized field for copy-pasted modified block

* test: add more tests

* fix: lint issues

* test: copy paste

* feat: skip sync if html data is modified

* feat: update upstream fields only when modified

* refactor: use version_synced field to skip sync

* feat: edit title inplace for library source components

* fixup! feat: edit title inplace for library source components

* fix: edit title button style

* fix: test case

* fix: lint issue

* refactor: don't show different icon for modified upstream blocks

* Revert "refactor: use version_synced field to skip sync"

This reverts commit 8b784fff2f49b43702c952e7f955bd4048e8cc69.

* feat: only skip sync for modified blocks if updated as part of container

* refactor: update sync behaviour when synced individually and as part of parent

* feat: include ready to sync children info in downstream link get api

* test: fix failing tests

* fix: lint issues

* feat: new tests and update api to allow overriding modified fields in sync

* test: api changes

* refactor: edit options should be visible for individual imports

* docs: update api docs

* chore: remove old comments
2025-09-17 14:50:24 +05:30
Ali-Salman29
539666dc40 feat!: remove cs_comments_service support for forum's content APIs
- This will force the use of the new v2 forum's APIs for Threads & Comment.
- Update params for get_user_subscription function. It uses the same structure as we have in the get_user_threads.
2025-09-15 09:10:06 -04:00
Muhammad Adeel Tajamul
51a254a45c feat: added feature to rate limit secondary email change (#37356) 2025-09-15 13:45:46 +05:00
Muhammad Adeel Tajamul
1a081f23c0 feat: added configurable param to rate limit email change in account settings (#37349) 2025-09-12 18:21:10 +05:00
Krish Tyagi
a403f4bcc4 chore!: removing of pyjwkest dependency from edx-platform (#37159) 2025-09-11 08:24:17 -04:00
coder1918
790a67a0d1 refactor: flatten FEATURES dictionary with backward compatible proxy 2025-09-09 14:11:39 -06:00
Nathan Sprenkle
cb7f0f4811 fix: fix bad serialization of courseware metadata (#37338)
* Formats single_paid_mode as a dict, rather than named tuple which couldn't be serialized to DictField
* Allow ecommerce_checkout_link to be empty

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-09 14:18:20 -04:00
Taimoor Ahmed
ed45fbba37 fix: Invalid read param in forum thread api
This PR fixes the invalid read parameter being passed in forum update_thread api.
this was somehow introduced in this commit 6f522f3992 (diff-b9d08209a02c673887f6ca72b0018758174e95508539adbcb6885f22c7844eb8L292)
2025-09-08 11:17:10 -04:00
Ram Chandra Bhavirisetty
42afa1bb62 chore: remove deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings (#37002) 2025-09-05 17:52:33 -04:00
Feanil Patel
06b54e79f2 Merge pull request #36845 from raccoongang/rg/axm-course-catalog-extend-courseware-api
feat: [FC-86] extend courseware api with new fields
2025-09-04 09:46:25 -04:00
Serhii Nanai
ed69cb554b fix: remove unused fields 'prerequisites', 'ocw_links' 2025-09-03 12:38:08 +03:00
Moncef Abboud
9c90fa0dd1 feat: tpa automatic logout with a single redirect 2025-09-01 13:23:45 +02:00
Hassan Raza
515ce7f791 chore: Management command to update preferences (#37297) 2025-09-01 13:08:43 +05:00
Serhii Nanai
577ef63a78 docs: add comment for skip_unless_lms 2025-08-29 13:30:35 +03:00
Serhii Nanai
b0ecbdfbd6 refactor: move import inside testcase
refactor: fix unused imports
2025-08-29 13:30:35 +03:00
Muhammad Adeel Tajamul
acad883a38 fix: added info in notification preferences (#37295) 2025-08-29 11:41:28 +05:00
Serhii Nanai
3a8366e053 docs: update docstring for course info serializer 2025-08-28 18:00:44 +03:00
Serhii Nanai
fa2eddb775 docs: update docstring for prerequisite course serializer 2025-08-28 17:58:06 +03:00
Mubbshar Anwar
4a27f9cbb5 fix: fix timezone for Django 5.2 (#37293) 2025-08-28 11:16:51 +05:00
Awais Qureshi
ec83b2aa64 fix: Updated tuple unpacking of signal receivers to match current structure in django52. (#37249) 2025-08-27 17:38:08 +05:00
Eemaan Amir
3b50dbb933 chore: remove edx.notifications.preferences.viewed event (#37285) 2025-08-27 17:04:04 +05:00
Muhammad Adeel Tajamul
abd305df85 feat: added rate limit on one click unsubscribe api (#37272)
* feat: added rate limit on one click unsubscribe api

* fix: fixed failing test

* chore: raise 400 error on invalid username

* fix: fixed pylint
2025-08-27 16:58:06 +05:00
Taimoor Ahmed
7e80061e39 fix: Discussion xblock error when loading for the first time
This PR fixes the user not being created when accessing the discussion xblock as the course_key was missing in some of the api calls and that lead to the forum backend not being fetched correctly.
2025-08-25 09:12:19 -04:00