Commit Graph

4898 Commits

Author SHA1 Message Date
Navin Karkera
d664f0e5d4 fix: update container key field usage 2025-05-12 06:58:15 +00:00
Rômulo Penido
f50565c730 feat: add last_published_at to upstream summary endpoint [FC-0083] (#36656)
Returns the last_published_at date from the upstream summary endpoint.
2025-05-09 12:04:39 -05:00
Braden MacDonald
2e91a05112 fix: Bugs with "Publish All Changes" in Library [FC-0083] (#36640)
* fix: "[created] received a naive datetime"
* fix: leaky "isolation" of events was causing test failures
* fix: make lib events more specific, emit them async, handle hierarchy correctly
* chore: bump openedx-events to 10.2.0 for new library PUBLISHED events
2025-05-08 11:57:07 -07:00
Jillian
5b3caa93e2 feat: store content.child_usage_keys in Container search document [FC-0083] (#36528)
* feat: store content.child_usage_keys in Container search document
  Stores the draft children + published children (if applicable)

Related fixes:
* fix: lib_api.get_container does not take a "user" arg
* refactor: fetch_customizable_fields_from_container does not need a "user" arg
* refactor: moves tags_count into LibraryItem
   because anything that appears in a library may be tagged.
* refactor: remove get_container_from_key from public API
   API users must use get_container and ContainerMetadata.
* refactor: made set_library_item_collections take an entity_key string instead of
  a PublishableEntity instance, so we don't need to fetch a Container object to call it.
* refactor: changed ContainerLink.update_or_create to take the container PK
  instead of a Container object, since this is enough.
  Added container_pk to ContainerMetadata to support this.
2025-05-02 10:47:25 +09:30
Navin Karkera
c2d9e40be4 refactor: update sync model helper function docs and minor cleanup (#36599)
* refactor: update sync model helper function docs

Adds some comments to explain certain confusing sections

* refactor: sync library content method

* feat: use edited_on block field

* test: modified field in course block index

* fix: extract uncommon methods to child class from base
2025-04-30 13:40:52 -07:00
Raymond Zhou
f741786012 fix: toggle name typo (#36597) 2025-04-28 11:34:01 -04:00
Navin Karkera
1cd73d1b96 feat: support for syncing units from libraries to courses (#36553)
* feat: library unit sync
* feat: create component link only for component xblocks
* feat: container link model
* feat: update downstream api views
* feat: delete extra components in container on sync (not working)
* fix: duplicate definitions of LibraryXBlockMetadata
* test: add a new integration test suite for syncing
* feat: partially implement container+child syncing
* fix: blockserializer wasn't always serializing all HTML block fields
* feat: handle reorder, addition and deletion of components in sync

Updates children components of unit in course based on upstream unit,
deletes removed component, adds new ones and updates order as per
upstream.

* feat: return unit upstreamInfo and disallow edits to units in courses that are sourced from a library (#773)
* feat: Add upstream_info to unit
* feat: disallow edits to units in courses that are sourced from a library (#774)

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>

* docs: capitalization of XBlock

Co-authored-by: David Ormsbee <dave@axim.org>

* refactor: (minor) change python property name to reflect type better

* fix: lots of "Tried to inspect a missing...upstream link" warnings

when viewing a unit in Studio

* docs: mention potential REST API for future refactor

* fix: check if upstream actually exists before making unit read-only

* chore: fix camel-case var

* fix: test failure when mocked XBlock doesn't have UpstreamSyncMixin

---------

Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Co-authored-by: Braden MacDonald <mail@bradenm.com>
Co-authored-by: David Ormsbee <dave@axim.org>
2025-04-24 11:41:47 -07:00
Kyle McCormick
875158f1ad feat!: Put "How It Works" Page Behind Waffle in Preparation for Removal (#36496)
We add a a new Waffle toggle:

* legacy_studio.logged_out_home

Unless enabled, unauthenticated users accessing Studio will now be sent
to the login page, and then redirected to the logged-in Studio home (the
course listing). By the Ulmo release, the Waffle will be removed along
with the howitworks page, and the new redirect-to-login behavior will
become the only available behavior.

The howitworks page is implemented as a legacy frontend, and we are not
seeing enough value in it to justify a rewrite in React. Via the DEPR
process we confirmed that the new behavior is acceptable, or even
preferable, as it removes edX.org-oriented language from the community
release and reduces the number of clicks needed for Studio users to log
in. We add an a new Waffle toggles

Part of: https://github.com/openedx/edx-platform/issues/36269
which is part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-24 17:07:25 +00:00
Kyle McCormick
8e9f94424d feat!: Flip Studio MFE Waffle Flags to be On-By-Default (#36495)
This makes nearly all of Studio React-by-default by replacing the
"opt-in-to-React" flags with a set of parallel
"opt-out-of-React-and-use-the-legacy-experience" flags. Here is the
mapping:

* `contentstore.new_studio_mfe.use_new_unit_page` ->
  `!legacy_studio.unit_editor`
* `new_core_editors.use_new_problem_editor` ->
  `!legacy_studio.problem_editor`
* `new_core_editors.use_new_text_editor` ->
  `!legacy_studio.text_editor`
* `new_core_editors.use_new_video_editor` ->
  `!legacy_studio.video_editor`
* `new_studio_mfe.use_new_home_page` ->
  `!legacy_studio.home`
* `contentstore.new_studio_mfe.use_new_custom_pages` ->
  `!legacy_studio.custom_pages`
* `contentstore.new_studio_mfe.use_new_schedule_details_page` ->
  `!legacy_studio.schedule_details`
* `contentstore.new_studio_mfe.use_new_advanced_settings_page` ->
  `!legacy_studio.advanced_settings`
* `contentstore.new_studio_mfe.use_new_grading_page` ->
  `!legacy_studio.grading`
* `contentstore.new_studio_mfe.use_new_updates_page` ->
  `!legacy_studio.updates`
* `contentstore.new_studio_mfe.use_new_import_page` ->
  `!legacy_studio.import`
* `contentstore.new_studio_mfe.use_new_export_page` ->
  `!legacy_studio.export`
* `contentstore.new_studio_mfe.use_new_files_uploads_page` ->
  `!legacy_studio.files_uploads`
* `contentstore.new_studio_mfe.use_new_course_outline_page` ->
  `!legacy_studio.course_outline`
* `contentstore.new_studio_mfe.use_new_course_team_page` ->
  `!legacy_studio.course_team`
* `contentstore.new_studio_mfe.use_new_certificates_page` ->
  `!legacy_studio.certificates`
* `contentstore.new_studio_mfe.use_new_textbooks_page` ->
  `!legacy_studio.textbooks`
* `contentstore.new_studio_mfe.use_new_group_configurations_page` ->
  `!legacy_studio.configurations`

Part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-24 12:34:35 -04:00
Ivan Niedielnitsev
3f67f3c295 feat: Import from modulestore APIs (#36540)
This PR is addressed at adding the functionality to import
modulestore-based content to the learning-core based learning
package.

Partof: https://github.com/openedx/frontend-app-authoring/issues/1681
2025-04-23 14:28:07 -04:00
Feanil Patel
544531423d Merge pull request #36532 from raccoongang/axm-default-advanced-modules
Allow Default Advanced Modules Configuration
2025-04-23 09:16:51 -04:00
Andrii
dcd7c1b171 refactor: move DEFAULT_ADVANCED_MODULES to hardcoded list instead of settings 2025-04-23 14:31:26 +03:00
Andrii
94c37e9449 refactor: simplify tests a bit & add DEFAULT_ADVANCED_MODULES to test settings 2025-04-22 11:59:05 +03:00
Kyle McCormick
57658b78d2 fix: add missing migraitons for import_from_modulestore (#36560) 2025-04-21 13:56:23 -04:00
Ivan Niedielnitsev
505b4f466c feat: Models for import_from_modulestore (#36515)
A new application has been created, described in this ADR:
https://github.com/openedx/edx-platform/pull/36545

have been created, as well as related models for mapping original content and
new content created during the import process. Python and Django APIs, as well
as a Django admin interface, will soon follow.
2025-04-17 19:03:46 +00:00
Chris Chávez
581596b52b fix: Transcripts in downstream creation [FC-0076] (#36509)
* Fix the issue described in https://github.com/openedx/frontend-app-authoring/issues/1352#issuecomment-2791305416
2025-04-16 17:11:03 +00:00
andrii-hantkovskyi
d5c50b5376 feat: [AXM-1899] add default advanced modules (#2634)
* feat: [AXM-1899] add default advanced modules

* test: [AXM-1899] add check for default advanced modules list

---------

Co-authored-by: Andrii <andrii.hantkovskyi@raccoongang.com>
2025-04-16 12:56:30 +03:00
Braden MacDonald
336fb018fb feat: support pasting units from courses into libraries (#36516)
* fix: don't allow pasting xblocks with children into libraries
* fix: IntegrityError: "Column 'md5_hash' cannot be null"
* feat: allow pasting a unit from a course into a library
* feat: auto-generate a nice block_id when pasting into a library
* test: add test for pasting unit from course into library
* fix: better handle potentially missing display_names during paste
* chore: clarifications and import cleanups
2025-04-15 15:25:46 -07:00
Muhammad Anas
2930214067 feat: add markdown editor waffle flag (#36512)
This PR adds contentstore.use_react_markdown_editor course waffle flag in cms.
This flag helps in enabling the markdown editor in the authoring mfe.

This PR also adds the markdown_edited field in the Problem Xblock to persist the
user's choice of switching to the markdown editor on the authoring MFE.

More details in the authoring MFE PR: openedx/frontend-app-authoring#1805
2025-04-15 11:28:19 -04:00
Kyle McCormick
1e6b40ac9a fix: Globally Enable Studio Content REST API (#36488)
There was a waffle flag `contentstore.enable_studio_content_api`,
intended to gate the "experimental" REST APIs at
`<CMS_ROOT>/api/contentstore/v{0,1,2}/*`. In practice, these APIs are no
longer experimental: for the past few named releases, they have been
enabled in Tutor and used to power the Authoring MFE.

We are making the Authoring MFE default-on in all Open edX sites
starting in Teak, with the legacy authoring frontend slated for removal
by Ulmo. Therefore, we need to remove flag which is gating the REST API.
We are _not_ introducing a temporary opt-out toggle, as we do need feel
it is necessary.

Part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-09 14:10:12 -04:00
Kyle D. McCormick
e6c24bdd0d refactor: Remove now-unused static asset Django settings
Closes: https://github.com/openedx/edx-platform/issues/36407
2025-04-09 13:38:36 -04:00
Kyle D McCormick
a8cb61dda9 fix: Remove Two Pointless Contentstore Waffle Flags
These flags had no effect, so they are being removed:

* new_core_editors.use_advanced_problem_editor
* new_editors.add_game_block_button

Related to: https://github.com/openedx/frontend-app-authoring/pull/1753
Part of: https://github.com/openedx/edx-platform/issues/26275
2025-04-09 13:38:36 -04:00
Muhammad Faraz Maqsood
87688af610 fix: move links with 500 status to forbidden links
move links with 500 status_code to external forbidden links category for manual checking
2025-04-04 10:51:12 +05:00
Ihor Romaniuk
f5c17bb88c feat: [FC-0070] add events and style for rendering Split xblock in chromeless template (#35813)
This feature introduces functionalities to improve XBlock interactions within iframes:

  * Add styles that adopt default styles for Split Test which renders chromless template via iframe in MFE Authoring.
  * When the isIframeEmbed option is enabled, the XBlock sends a postMessage to the parent window. When sending such a message, the standard link transition is cancelled and the transition is carried out in MFE Authoring.
2025-03-31 18:31:59 -03:00
Hina Khadim
3834f20841 fix: sort sections in course-optimizer before returning result (#36441) 2025-03-28 19:34:29 +05:00
Muhammad Faraz Maqsood
646c2ac898 fix: move links with status None to forbidden link
- move external links with status None to external forbidden links
- also modified the tests that fails for previous code
2025-03-28 12:19:12 +05:00
Jansen Kantor
5e61a1d959 feat: allow transcripts to work with more than two-letter language codes (#36419)
* feat: allow transcripts to work with more than two-letter language codes

* style: quality

* fixup! Merge branch 'master' into jkantor/video-transcript-codes

* fix: s/LANGUAGES_DICT/LANGUAGE_DICT/
2025-03-27 11:30:44 -04:00
leoaulasneo98
1dfe43af76 Edx platform 35175 deprecate assert dict contains subset (#36236)
* fix: replace deprecated assertDictContainsSubset with assertEqual
2025-03-25 14:58:16 +05:00
Hina Khadim
de62ca70ac fix: replace is_locked with linkState to handle various link types in Course Optimizer (#36406) 2025-03-24 16:41:17 +05:00
Saad Yousaf
811fe1ba48 fix: make course optimizer specific changes to user task completion email 2025-03-21 15:13:24 +05:00
Muhammad Farhan
e9c52100ef fix: improve regex to exclude data: urls (#36415) 2025-03-20 19:33:10 +05:00
Muhammad Farhan
dcf95f4f6a fix: handle /jump_to_id/ URLs in course optimizer urls (#36400) 2025-03-18 19:25:30 +05:00
Bryann Valderrama
f90e59e52a docs: add event_type inline code annotation for open edX events (#36355) 2025-03-14 09:55:50 +01:00
Navin Karkera
711d6aa357 refactor: downstream entity links api [FC-0076] (#36311)
Refactors downstream links API to handle multiple filters using a single API. Also adds a new route to return summary of library links for a given course.
2025-03-12 17:56:12 +00:00
Chris Chávez
f5fde97ae8 fix: Show tag count when paste a component in a course [FC-0046] (#36318)
* fix: Show tag count when paste a component in a course

* refactor: get_children_tags_count updated to get_tags_count
2025-03-12 18:09:12 +05:30
Rômulo Penido
6ce674a7a7 fix: set imported xblock parent (#36338)
Fixes a bug in which the index document was created while pasting a component with empty breadcrumbs field.
2025-03-10 19:11:27 +00:00
Saad Yousaf
fb31f82177 docs: update course optimizer toggle documentation to accurate represent toggles working 2025-03-07 17:56:30 +05:00
Hina Khadim
0054eb2d33 fix: Exclude Drag and Drop blocks from the link-scanning step in the Course Optimizer (#36321)
* fix: ignore drag and drop in course optimizer scanning links step
2025-03-07 11:32:57 +05:00
Muhammad Farhan
988801f3c0 fix: handle AttributeError in exception clause (#36317) 2025-03-04 13:05:04 +05:00
Muhammad Farhan
0e0d1dab95 feat: Add test for detecting broken and locked links (#36286) 2025-02-26 12:09:23 +05:00
Rômulo Penido
9451cfca26 feat: add API to return list of downstream blocks for an upstream [FC-0076] (#36253)
Adds the API for listing downstream contexts and parents for a given publishable entity.
2025-02-25 13:55:02 -05:00
Bryann Valderrama
a2bb8c9458 refactor!: remove ENABLE_HOME_PAGE_COURSE_API_V2 feature toggle (#36181) 2025-02-24 16:42:06 +01:00
Muhammad Faraz Maqsood
2798f28c2a fix: send correct status for scanning 2025-02-24 13:31:08 +05:00
Chris Chávez
b6489e718c feat: Video editor supports transcripts [FC-0076] (#36058)
* Add error handler on save video to avoid creating sjson
* Support transcripts without edx_video_id in definition_to_xml
* When copying a video from a library to a course: Create a new edx_video_id
* Save transcripts as static assets in a video in a library when adding a new transcript.
* Delete transcripts as static assets in a video in a library when deleting transcripts.
* Support download transcript in a video in a library.
* Support replace transcript in a video in a library.
* Support updating transcripts in video in a library.
* Refactor the code of downloading YouTube transcripts to enable this feature in libraries.
* Support copy from a library to a course and a course to a library.
2025-02-21 13:33:13 -05:00
Maria Grimaldi
6c6fd84e53 fix: import authoring filter from content_authoring instead (#36109)
Correctly name authoring subdomain according to DDD docs: https://openedx.atlassian.net/wiki/spaces/AC/pages/663224968/edX+DDD+Bounded+Contexts
2025-02-21 14:55:50 +01:00
Peter Kulko
0319d62a78 feat: course unit - edit iframe modal window (#35777)
Adds logic to support the functionality of editing xblocks via the legacy modal editing window.
2025-02-20 17:02:43 -03:00
michaelroytman
c9beec776f feat: make computation of due date for edx-proctoring powered exams consistent
This commit fixes an inconsistency in the way an exam due date is computed for courses that do not use an LTI based proctoring provider.

The edx-exams microservice was released last year to provide support for LTI based proctoring providers. After the release of this microservice, all proctoring requests initiated by the platform began to be funneled through the microservice, which acted as a broker for these requests, routing them directly to the service for exams in courses using an LTI based proctoring provider or to the platform edx-proctoring plugin for all other cases.

There is an asynchronous task in the platform that syncs exams from the platform to either the edx-exams microservice or the edx-proctoring plugin. Prior to the release of the microservice, this task computed the due date on exams as the exam subsection due date if the course was instructor-paced or None. After the release of the microservice, the task computed due dates differently than before. The due date on exams was computed as the due date on the exam, if there was one, or the end date of the course, if there was one, or None. This differed from the prior definition.

This resulted in inconsistent due date behavior. The exams in courses that were published or republished after the edx-exams microservice was released had the new computation of due date, while exams in courses that were published or republished before the edx-exams microservice was released had the old computation of due date.

This causes an issue for all exams in courses using non-LTI based providers. This is because the due date on exams across all courses that either do not use proctoring or that use a non-LTI based provider are inconsistent, depending on when they were last published.

This commit reintroduces the old computation to the task for exams in courses using a non-LTI based proctoring provider (i.e. those courses whose exams are not powered by the edx-exams microservice). In order to maintain the functionality of edx-exams, we continue to compute the due date as before for exams in courses using an LTI based proctoring provider (i.e. those courses whose exams are powered by the edx-exams microservice).
2025-02-20 09:44:35 -05:00
Kyle D. McCormick
6124695fdf refactor: Remove broken Force-Publish UI from Studio
Co-Authored-By: Feanil Patel <feanil@axim.org>
2025-02-19 09:07:57 -05:00
Kyle McCormick
569c2d9ad2 Revert "fix: Remove pointless Maintenance and Announcement apps (#35852)"
This reverts commit 9274852f2d.
2025-02-19 09:07:57 -05:00
Navin Karkera
a1d0826a2a feat: entity link view and api (#36190)
Adds api for listing upstream entity links for a given course.
2025-02-18 15:34:00 +00:00