Student Notes popup never appears

After installing/enabling, and running launch, I can’t select the note to make a note.

The only error i see in console:

lms-main_vendor.679d23b65ba4.js:1 [Violation] Permissions policy violation: unload is not allowed in this document.
(anonymous)	@	lms-main_vendor.679d23b65ba4.js:1
(anonymous)	@	lms-main_vendor.679d23b65ba4.js:1
(anonymous)	@	lms-main_vendor.679d23b65ba4.js:1
(anonymous)	@	lms-main_vendor.679d23b65ba4.js:1
(anonymous)	@	lms-main_vendor.679d23b65ba4.js:1

I know these plugins will get tested before release, but something might caused the issue that I’m not seeing. Anyone has any idea?

Versions:
tutor 22.0.3
tutor-mfe 22.1.0
tutor-notes 22.0.1

Root cause

The select-text popup is Annotator.js, which runs inside the LMS unit iframe (openedx-platform), not in frontend-app-learning. The MFE only renders the “Show/Hide Notes” button and posts a tools.toggleNotes message.

The LMS loads Annotator only for blocks wrapped in .edx-notes-wrapper. That wrapper is added by the @edxnotes decorator (lms/djangoapps/edxnotes/decorators.py). In this build, the decorator is applied only to the built-in _BuiltInHtmlBlock in xmodule/html_block.py. USE_EXTRACTED_HTML_BLOCK defaults to True, so the LMS uses xblocks_contrib.html.HtmlBlock instead. That class has no @edxnotes decorator.

Evidence:

  • The notes API, OAuth and settings (ENABLE_EDXNOTES, EDXNOTES_PUBLIC_API) are all configured correctly, and the notes tab and toggle button render.
  • Loading the unit iframe URL directly showed 0 .edx-notes-wrapper elements and 0 Annotator instances, so there was nothing for the popup to attach to.

Fix

A small Tutor plugin (plugins/notes-html-block.py) adds USE_EXTRACTED_HTML_BLOCK = False to openedx-lms-common-settings:


from tutor import hooks

hooks.Filters.ENV_PATCHES.add_item(
    ("openedx-lms-common-settings", "USE_EXTRACTED_HTML_BLOCK = False")
)

It applies to the LMS only, and Studio keeps the extracted block. After tutor config save and an LMS restart, selecting text in a Text unit shows the pencil icon, and clicking it opens the note editor (comment box, tags, Save/Cancel). No image rebuild is needed, since it is a settings change only.