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

Abierto
#39,223 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #39277 de @florianaltendorfer — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
32/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
8.2k
Forks
4.4k
Merge medio
2 d 10 h
PR fusionados (30 d)
40

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openedx/openedx-platform

Todos los issues de openedx/openedx-platform

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.