Commit Graph

4579 Commits

Author SHA1 Message Date
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
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
Jillian
c02e567201 Make copied tags editable again after breaking the upstream link to library content [FC-0076] (#36228)
When deleting an upstream library block, ensure that any tags that may have been copied to downstream blocks are made editable again. This is achieved by un-setting the `is_copied` flag on the downstream tags.
2025-02-13 11:53:05 -05:00
Irtaza Akram
a8a8ae3286 fix: replace pkg_resources with importlib.resources (#36213) 2025-02-13 17:43:07 +05:00
Navin Karkera
2598084946 feat: upstream downstream link model [FC-0076] (#36111)
Adds models, tasks, signal handlers and api's for adding, updating and deleting upstream->downstream links in database.
2025-02-11 12:15:50 -05:00
Raymond Zhou
30039845a4 revert: remove problematic test code (#36238) 2025-02-10 16:12:26 -05:00
Daniel Valenzuela
36c16d6952 fix: static assets used in problem bank and library content block (#36173)
Static assets were not being copied into the course when using library content via Problem Bank or "Add Library Content" workflows.
2025-02-07 10:30:05 -08:00
Raymond Zhou
02fc9c928f 2u/course optimizer (#35887) 2025-02-06 12:47:17 -05:00
Jesper Hodge
1f43d17b21 Revert "Replace pkg_resources with importlib.resources" (#36208) 2025-02-05 08:51:50 -05:00
Usama Sadiq
1a16073ad0 fix: enable pylint warnings (#36196) 2025-02-03 14:18:11 +05:00
Navin Karkera
5e51e2d5b7 fix: swagger docs ref_name conflicts (#36189)
* fix: swagger docs ref_name conflicts

* fix: swagger auto doc errors

* chore: bumps openedx-learning==0.18.2

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
2025-01-30 20:32:18 +05:30
Usama Sadiq
b6828cecaa fix: enable pylint warnings (#36195)
* fix: enable pylint warnings
2025-01-30 17:15:33 +05:00
Jillian
3847cec503 feat: add and switch to downstream-only fields [FC-0076] (#36158)
Adds the concept of "downstream-only" fields to the XBlock upstream sync logic.

Downstream-only fields are customizable fields set only on the downstream XBlock -- we don't keep track of the upstream field value anywhere on the downstream XBlock. Changes made to these fields in the upstream block are ignored, and if the link to the upstream block is severed, the downstream changes are preserved (not reset back to defaults, like the upstream-tracked customizable fields are).

The fields chosen as "downstream-only" are those related to scoring and grading.

The `max_attempts` field was previously a customizable field that tracked the upstream value. However, because it is scoring-related, it has been converted to a "downstream-only" field.

This change impacts course authors' use of library content in their courses.
2025-01-27 15:37:53 +00:00
Feanil Patel
da0d365ee3 Merge pull request #36044 from openedx/pkg_resources-depr
Replace pkg_resources with importlib.resources
2025-01-23 11:05:45 -05:00
Ataf Fazledin Ahamed
241997ec88 fix: Replaced mktemp with a safer alternative mkstemp
* fix: Replaced `mktemp` with a safer alternative `mkstemp`

Signed-off-by: fazledyn-or <ataf@openrefactory.com>

---------

Signed-off-by: fazledyn-or <ataf@openrefactory.com>
Co-authored-by: Edward Zarecor <ezarecor@tcril.org>
Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
2025-01-22 23:18:31 +05:30
David Ormsbee
d018675968 perf: reduce ORM queries needed for video quality info
The CourseQualityView used to call edx-val's get_video_for_course(),
which would return a fully serialized data structure that included all
encodings and inefficiently serialized them with many n+1 queries. This
is tolerable in a paginated web view, but not when pulling all of a
large courses's videos at once.

Making this change collapsed the number of queries for a large sample
MIT course from over 3000 down to 1.
2025-01-21 12:06:40 -05:00
Ihor Romaniuk
8aeaaf4e21 feat: [FC-0070] add message events and styles to the library content page (#35785)
This introduces improvements for XBlock interactions within iframes:

* Add default styles for Library Content that renders in the iframe in the new Studio unit page
* 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 the MFE.
2025-01-16 14:05:26 -03:00
Jillian
b96a3bf249 fix: allow_to_create_new_org checks org autocreate [FC-0076] (#36094)
Updates the StudioHome API's allow_to_create_new_org to require both organization-creation permissions and ORGANIZATION_AUTOCREATE to be enabled. It also adds the list of "allowed organizations for libraries" to the Studio Home API so that the Authoring MFE can use it.
2025-01-15 17:32:37 +00:00
Muhammad Arslan
343d521619 chore: Remove unused variable and rebased 2025-01-14 14:03:00 +05:00
Muhammad Arslan
f6f72290b7 build: Remove unused imports 2025-01-14 14:03:00 +05:00
Muhammad Arslan
838977a8f3 feat!: Remove DEPR waffle switch: ENABLE_GLOBAL_STAFF_OPTIMIZATION 2025-01-14 14:02:37 +05:00
Irtaza Akram
acdbff8b4c fix: remove pkg_resources 2025-01-08 16:45:19 +05:00
Adolfo R. Brandes
394a459dec feat: remove the broken Zooming Image Tool
The Zooming Image Tool does not load properly, currently, and even if it
did, relying on an external Javascript to function across releases is
not something we can support.  Thus, we remove it from the list of HTML
block templates until such time as a more robust solution is found.
2024-12-09 13:05:40 -03:00
Rômulo Penido
8d4909a999 fix: content libraries permissions
This PR changes the permissions for content libraries so that only
people who can create courses should be allowed to create new content
libraries.
2024-12-06 09:18:04 -05:00
Maria Grimaldi
1c835eb643 fix: return empty list when no courses are found for request (#35942)
This change addresses an issue reported while testing Sumac, where the API V2 is on by default in the authoring MFE: openedx/wg-build-test-release#428. It fails when retrieving an empty list of courses with the queryparams api/contentstore/v2/home/courses?page=1&order=display_name. When this was implemented, the course authoring MFE rendered the empty lists only with page=1 query param (didn't do any filtering/ordering by default), which was later changed to page=1&order=display_name which now ordered by default.

This issue occurs because all the filtering and ordering are done under the assumption that course_overviews is always a query set. However, that's only true when there are courses available and CourseOverview.get_all_courses is used. When not, an empty list is returned instead, raising a 500 error in Studio.
2024-12-05 15:52:57 +01:00
Braden MacDonald
919cc78be1 fix: Don't add 'x-is-pointer-node' to capa problems on paste 2024-11-29 00:27:43 +05:30
Jesper Hodge
38e5745e06 feat: add course optimizer waffle flag (#35884)
Description
Add a waffle flag to toggle on or off the new Course Optimizer feature per course.

Impact
Course Author

Context
Course Optimizer is a much-requested feature that has been aligned with the OpenEdx community. The only component for now is a broken link checker that will return a list of all broken links in a course to the frontend. There will be a new page for this that is a bit similar to the export page.

This PR only deals with adding a waffle flag.

Supporting information
Internal Ticket (2U):
https://2u-internal.atlassian.net/browse/TNL-11808
2024-11-20 20:51:46 +00:00
Navin Karkera
d9f6afa264 feat: add beta flag to component templates (#35802)
Mark components like libraryv2 and problem bank beta in API to be used by both legacy templates and new authoring mfe.

Also updates order of components.
2024-11-13 18:27:54 +00:00
Alison Langston
e50490da88 feat: add optional inclusion date arg to course reindex command (#35830)
* feat: add optional inclusion date arg to course reindex command

* fix: pylint
2024-11-12 15:34:04 -05:00
Navin Karkera
68739ce73c fix: hide library_v2 and itembank in legacy library page (#35772)
Hide options to add library_v2 and itembank blocks in legacy library
page.
2024-11-12 20:36:41 +05:30
Rodrigo Martin
4e6c3dc598 fix(AU-2269): Add logs to get_course_youtube_edx_video_ids (#35804) 2024-11-07 15:40:42 -03:00
Navin Karkera
d82aadab51 fix: set upstream link for re-copied block from course originally from library (#35784)
Sets upstream link to library block for blocks that were copied from a course block which were originally copied/imported from a library.
2024-11-07 09:54:53 -05:00
Jillian
9bfdfeb313 fix: remove the "Legacy Library" button if libraries v1 are disabled (#35736)
Removes the "Legacy Library" button from the legacy Studio "new block" button array if Libraries v1 are disabled, either via waffle flag or via the ENABLE_CONTENT_LIBRARIES feature flag.
2024-11-06 11:00:04 -05:00
Feanil Patel
5904b54378 Merge pull request #35185 from openedx/feanil/blockstructure_cache
feat!: Drop the block_structure.storage_backing_for_cache WaffleSwitch
2024-11-06 10:52:47 -05:00
Jillian
689feba172 fix: allow non-Elasticsearch search engines when reindexing courses [FC-0062] (#35743) 2024-11-06 18:49:45 +05:30
Feanil Patel
80ed5ee2a4 fix: Send the course publish signal on course import. 2024-11-05 10:44:17 -05:00
Sagirov Evgeniy
f730276263 feat: Add API endpoint to manage course waffle flags (#35622)
Co-authored-by: Sagirov Eugeniy <evhenyj.sahyrov@raccoongang.com>
2024-11-04 15:13:37 -03:00
Kristin Aoki
e13d66d1e4 feat: support unit preview in learning MFE (#35747)
* feat: update preview url to direct to mfe

* fix: use url builder instead of string formatter

* fix: url redirect for never published units

* fix: remove 404 error when  not a preview or staff

* feat: update sequence metadata to allow draft branch
2024-11-01 11:03:06 -04:00
Navin Karkera
949378f63f fix: do not open MFE editors automatically on block paste (#35728) 2024-10-28 11:34:53 -07:00