Video: course-side title override of a library-synced Video is lost on sync (editor_saved doesn't call super)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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(...).
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- JavaScript
- 星标
- 0
- 派生
- 19
- 平均合并
- 8 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/xblocks-core 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 84/100
openedx/xblocks-core#305 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 43/100
openedx/xblocks-core#332 ·
维护者通常 1 天内回复
-
Annotatable: newly created empty block in a Content Library V2 fails to render (XMLSyntaxError: Document is empty)可能已有人在做 @irfanuddinahmad 于 5 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
openedx/xblocks-core#323 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
openedx/xblocks-core#306 ·
维护者通常 1 天内回复
-
WCAG - Question Content Not Programmatically Associated With Answer Choices可能重新可做 @jesusbalderramawgu 于 66 天前认领,目前没有进行中的 PR。 未关闭
openedx/xblocks-core#300 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 openedx/xblocks-core 的全部 Issue
相似的 Issue
-
Client execution contract accepts a grant the code never takes可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area: client enhancement priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
opensro-dev/opensro#3808 ·
维护者通常 1 天内回复
-
luciano_blocktronics: sysop chat status views are both keyed TL10 and use itemFormat, which a TextView ignores可能已有人在做 @Z3NMA 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
NuSkooler/enigma-bbs#1058 ·
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement good first issue severity: low
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Static_Chess#163 ·
维护者通常 1 天内回复