Skip to content

feat: add invideoquiz xblock - #3247

Draft
alenkadev wants to merge 1 commit into
openedx:masterfrom
alenkadev:alenka/upstream-changes-invideo-quiz
Draft

alenkadev wants to merge 1 commit into
openedx:masterfrom
alenkadev:alenka/upstream-changes-invideo-quiz

Conversation

@alenkadev

Copy link
Copy Markdown

Description

Adds a new MFE-based Studio editor for the In-Video Quiz (invideoquiz) XBlock, replacing the legacy raw XML/JSON editing experience with a proper form-based UI inside frontend-app-authoring.

Course Authors can now, from a unit page:

  • Select which video in the unit the quiz is attached to
  • Add one or more timed quiz entries, each pairing a video timestamp with a problem from the unit
  • Configure an optional "jump back" time per entry
  • Save directly through the standard Studio editor Save flow

Specific changes included:

  • New InVideoQuizEditor component, Redux slice (inVideoQuiz), and thunk actions for loading/saving quiz configuration (selectedVideo, quizItems) against the XBlock's backend fields.
  • Registered invideoquiz in supportedEditors.ts so it opens the new editor instead of the legacy one.
  • Editor now automatically opens immediately after a new In-Video Quiz component is added to a unit, instead of requiring a separate click to edit.
  • Save button now reads "Save" (previously "Add to course").
  • A dismissible "Content not found" alert now shows in the editor if the containing unit has no video or no problem components yet, since the quiz can't be configured without both.
  • Single-select and dropdown problem types now enforce exactly one correct answer — selecting a new correct answer automatically clears the previous selection, instead of allowing multiple.

Who this impacts:

  • Course Author — primary audience; this is the whole editing experience for the block.
  • Developer — introduces a new editor pattern/Redux module under src/editors/ for anyone extending or maintaining this XBlock's authoring UI.

Supporting information

Corresponds to internal ticket LP-895 and companion work on the openedx/xblock-in-video-quiz package (v2.0.0), which this editor's saved fields (timemap, jump_back, video_id) map onto.

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