Video: course-side title override of a library-synced Video is lost on sync (editor_saved doesn't call super)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Start with xblock_video.block.VideoBlock.editor_saved() and compare it with cms.lib.xblock.upstream_sync.UpstreamSyncMixin.editor_saved(); the issue says the built-in video block has the same override. Find the Video tests covering editor saves and downstream sync, then add coverage showing a customized display_name survives an accepted library update. Done when that test passes and the video save still calls VideoConfigService.handle_editor_saved(...).
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
For a Video reused from a Content Library V2 into a course, a course-side title override is overwritten by the next sync from the library. The same flow keeps the override for HTML, Word Cloud, LTI and Problem.
Steps to reproduce
Found while smoke-testing openedx/openedx-platform#38750 on a local Tutor nightly (platform master base + xblocks-core 2.0.0):
- Publish a Video in a V2 library and reuse it in a course unit (Library content).
- In the course, change the reused copy's display name to "Course override".
- In the library, rename the video and publish.
- Accept the update in the course (
POST /api/contentstore/v2/downstreams/<usage>/sync).
Expected: "Course override" is kept (display_name is customizable by default).
Actual: the title becomes the library's new name.
Cause
The platform mixes cms.lib.xblock.upstream_sync.UpstreamSyncMixin into every XBlock (XBLOCK_MIXINS). Its editor_saved() records customized fields in downstream_customized. xblock_video.block.VideoBlock.editor_saved() overrides it and only calls VideoConfigService.handle_editor_saved(...), never super().editor_saved(...). So for a mixed Video class, editor_saved resolves to VideoBlock.editor_saved, and the override is never recorded. For HTML it resolves to UpstreamSyncMixin.editor_saved (checked in a CMS shell).
This predates the extraction: the built-in xmodule/video_block/video_block.py::editor_saved is identical.
Suggested fix
Call super().editor_saved(user, old_metadata, old_content) from VideoBlock.editor_saved (when the parent defines it), plus a test that a customized display_name survives a sync.
| Generated using Claude Code
- Ngôn ngữ chính
- JavaScript
- Star
- 0
- Fork
- 19
- Merge trung bình
- 8 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openedx/xblocks-core
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
openedx/xblocks-core#305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
openedx/xblocks-core#332 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Annotatable: newly created empty block in a Content Library V2 fails to render (XMLSyntaxError: Document is empty)Có thể đã có người làm @irfanuddinahmad đã nhận 5 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
openedx/xblocks-core#323 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ChoiceTextResponse: a submission that omits a required numtolerance_input key is graded correctĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
openedx/xblocks-core#306 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
WCAG - Question Content Not Programmatically Associated With Answer ChoicesCó thể làm lại được @jesusbalderramawgu đã nhận 66 ngày trước và không có pull request nào đang mở. Đang mở
openedx/xblocks-core#300 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openedx/xblocks-core
Issue tương tự
-
Client execution contract accepts a grant the code never takesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea: client enhancement priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opensro-dev/opensro#3808 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
luciano_blocktronics: sysop chat status views are both keyed TL10 and use itemFormat, which a TextView ignoresCó thể đã có người làm @Z3NMA đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NuSkooler/enigma-bbs#1058 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Static_Chess#163 ·
Maintainer thường phản hồi trong vòng 1 ngày