Notes: extracted HtmlBlock is not wrapped by @edxnotes, so no HTML component is annotatable

Đang mở
#39,223 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #39277 của @florianaltendorfer — đã đóng, không merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
32/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start with xmodule/html_block.py, where @edxnotes wraps only _BuiltInHtmlBlock, then read the decorator in lms.djangoapps.edxnotes.decorators and xmodule/edxnotes_utils.py. Read the diff of #38014 to see the earlier attempt. Done means an HTML component rendered with USE_EXTRACTED_HTML_BLOCK on carries the edx-notes-wrapper element, and a maintainer has chosen between reviving #38014 and adding an opt-in hook. The design choice is open, so confirm it before writing code.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

With USE_EXTRACTED_HTML_BLOCK on (the default on master and release/verawood), Student Notes cannot annotate any HTML component.

Components become annotatable through the @edxnotes decorator (xmodule/edxnotes_utils.py → lms.djangoapps.edxnotes.decorators), which wraps the student view in the edx-notes-wrapper the annotator attaches to. In xmodule/html_block.py it is applied only to _BuiltInHtmlBlock. The extracted xblocks_contrib.html.HtmlBlock (now in openedx/xblocks-core) is used undecorated.

With the notes service running and ENABLE_EDXNOTES on for the course, a unit renders the notes show/hide control and loads the annotator scripts, but no component is wrapped. There is no text a learner can select to take a note on, and the course's Notes page stays empty.

Prior work: #38014 applied @edxnotes to the extracted block. Its author closed it in February in favour of setting USE_EXTRACTED_HTML_BLOCK=False, assuming notes support would land in xblocks-contrib before the toggle is removed. I found no issue tracking that, here or in xblocks-core. Since the decorator lives in the LMS, the extracted block can't apply it itself.

Expected: HTML components are annotatable with the extracted block, as they were with the built-in one. Either revive #38014's approach, or provide a hook that lets the extracted block opt in. Notes support should also be a precondition for removing the USE_EXTRACTED_HTML_BLOCK toggle.

Environment: Tutor main with the notes plugin, xblocks-contrib 1.0.6, 2026-09-23. Code unchanged on master as of 2026-10-13. Found by the Open edX end-to-end test suite.

Ngôn ngữ chính
Python
Star
8.2k
Fork
4.4k
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của openedx/openedx-platform

Tất cả issue của openedx/openedx-platform

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.