Skip to content

ol_openedx_feedback: Per-block learner feedback in learning MFE#813

Open
zamanafzal wants to merge 1 commit into
mainfrom
zafzal/11629-block-feedback
Open

ol_openedx_feedback: Per-block learner feedback in learning MFE#813
zamanafzal wants to merge 1 commit into
mainfrom
zafzal/11629-block-feedback

Conversation

@zamanafzal

@zamanafzal zamanafzal commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

Per-block content feedback — subtask mitodl/hq#11815 (RFC mitodl/hq#11812, parent mitodl/hq#11629).

Companion PRs:

  • mitodl/smoot-design#241 — feedback drawer UI bundle
  • mitodl/lehrer#83 — Learning MFE slot wiring
  • mitodl/learn-ai#556 — backend endpoint + model

Description (What does it do?)

Adds ol_openedx_feedback, a lean trigger-only XBlockAside that renders a "Send feedback" megaphone on applicable blocks in the LMS student view. Feedback is not persisted in edx-platform — it is collected by the Learning MFE drawer and submitted to learn-ai.

  • Renders only for authenticated, non-author users; leaf blocks only (excludes course / chapter / sequential / vertical); gated per course by the ol_openedx_feedback.feedback_enabled CourseWaffleFlag.
  • On click it postMessages ol-feedback::drawer-open to the parent (Learning MFE) window with block context (courseId, blockUsageKey, blockType, blockDisplayName).
  • Trigger-only — no models, serializers, views, URLs, or migrations; apps.py is aside-only (plugin_app = {}). The MFE owns the submit URL and enriches the payload with course_name / unit_title / url.

How can this be tested?

  • Install the plugin in the LMS and enable the ol_openedx_feedback.feedback_enabled CourseWaffleFlag (globally or per course).
  • Open a courseware unit as a signed-in learner → the "Send feedback" megaphone renders on leaf blocks (docked next to AskTIM when present); clicking it opens the feedback drawer in the Learning MFE.
  • Automated: pytest src/ol_openedx_feedback/tests — covers should_apply_to_block (waffle-flag gate + leaf-block filter + course-import branch) and student-view rendering (authenticated vs anonymous/author).

Additional Context

The drawer UI ships in smoot-design (#241), the MFE slot wiring in lehrer (#83), and submissions are stored by learn-ai (#556). This PR is the LMS-side trigger only.

@zamanafzal zamanafzal changed the title refactor(ol_openedx_feedback): strip to aside-only (data -> learn-ai) ol_openedx_feedback: Per-block learner feedback in learning MFE Jun 15, 2026
Comment thread src/ol_openedx_feedback/ol_openedx_feedback/static/js/feedback.js
Adds the ol_openedx_feedback XBlockAside: a "Send feedback" trigger on
applicable leaf blocks in the LMS student view.

- Renders for authenticated, non-author users only; leaf blocks only
  (excludes course/chapter/sequential/vertical); gated per course by the
  ol_openedx_feedback.feedback_enabled CourseWaffleFlag.
- On click, posts an ol-feedback::drawer-open message to the parent
  (Learning MFE) window. Trigger-only: no models, API, or migrations —
  the drawer UI and persistence live in the MFE and learn-ai.
- Includes README, feedback.js/.css/.html assets, and aside tests.
@zamanafzal zamanafzal force-pushed the zafzal/11629-block-feedback branch from 69914af to 9ec8f0c Compare July 8, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant