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

Aperta
#39,223 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #39277 di @florianaltendorfer — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
32/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
8.2k
Fork
4.4k
Merge medio
2g 10h
PR unite (30g)
40

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openedx/openedx-platform

Tutte le issue di openedx/openedx-platform

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.