Restoring a published QTI item stores lxml's reserialization instead of the published XML
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
- 30/100
Hướng nghiên cứu
Read contentcuration/contentcuration/utils/import_tools.py around lines 585–588 and contentcuration/contentcuration/utils/assessment/qti/media.py around lines 33–34 to trace how restore handles QTI XML. Run pytest contentcuration/contentcuration/tests/test_restore_channel.py -k QTIRestore to reproduce the failure. Done means the restore tests pass, restored QTI and Perseus raw_data matches the source, and republished package item files match the source package; the issue says it is not open for contribution.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: unstable
Observed behavior
- Restore stores a QTI item's
raw_databy passing the packaged XML throughrewrite_qti_media_paths(import_tools.py#L585-L588, from #6243). - Since #6241,
rewrite_qti_media_pathsreparses the item and returns lxml's serialization (media.py#L33-L34), so the restoredraw_datadiffers from the source item's. - The two PRs merged minutes apart; the Python unit tests job has failed on
unstablesince then, and on every PR based on it.
Errors and logs
FAILED test_restore_channel.py::QTIRestoreTestCase::test_dual_published_node_restores_each_question_once
FAILED test_restore_channel.py::QTIRestoreTestCase::test_qti_only_node_restores_editor_and_legacy_items_as_qti
SUBFAILED(order=1) test_restore_channel.py::QTIRestoreTestCase::test_perseus_question_in_package_restores_as_perseus_question
E AssertionError: '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<qti-assess[1250 chars]tem>' != '<?xml version="1.0" encoding="UTF-8"?><qti-assessment-i[1247 chars]tem>'
contentcuration/contentcuration/tests/test_restore_channel.py:417: AssertionError
User-facing consequences
- CI is red for every Studio PR, so real regressions in the Python suite are hidden.
Steps to reproduce
- Check out
unstableat51657a6d9. - Run
pytest contentcuration/contentcuration/tests/test_restore_channel.py -k QTIRestore.
Acceptance Criteria
-
pytest contentcuration/contentcuration/tests/test_restore_channel.pypasses onunstable. - A restored QTI or Perseus-question item's
raw_dataequals its source item'sraw_data. - Republishing a restored node produces package item files equal to the source package's.
AI usage
Claude Code found the failure while fixing CI on #6273, bisected it to the #6241/#6243 merge, and drafted this issue.
- Ngôn ngữ chính
- Python
- Star
- 192
- Fork
- 310
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 learningequality/studio
-
Set unpublishable: true on PublishedChange by construction to simplify handleMaxRevs predicateĐang mởDEV: frontend P3 - low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
learningequality/studio#5868 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TAG: tech update / debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
learningequality/studio#2245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
learningequality/studio#6319 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TAG: tech update / debt
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
learningequality/studio#6318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug DEV: frontend P0 - critical
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 22/100
learningequality/studio#6316 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của learningequality/studio
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
webrecorder/warcio#209 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Jeffy123-zhu/logspecter#20 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày