feat(inVideoQuiz): allow multiple in-video quiz problems at the same timestamp - #104
Merged
Conversation
…map handling - Removed duplicate timestamp validation from InVideoQuizEditor, allowing multiple problems to share the same timestamp. - Updated quiz item handling in the Redux thunk actions to support expanded timemap formats, including legacy and multi-problem structures. - Introduced new utility functions for normalizing problem IDs and jump-back fields, improving code organization and readability. - Added comprehensive unit tests for new and existing functionality to ensure robustness and correctness.## Backend PR —
viv-helix
approved these changes
Jun 23, 2026
- Added state to manage loading status of unit content in the InVideoQuizEditor. - Updated logic to determine visibility of alerts based on the new loading state. - Enhanced Redux actions and reducers to handle the new state, ensuring proper updates during content loading. - Modified tests to cover scenarios involving the new loading state, ensuring accurate rendering and behavior during content fetch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support ticket:
Summary
Updates the In-Video Quiz editor MFE to configure multiple problems at the same timestamp, with per-problem jump-back values. Removes duplicate-time validation and adds timemap/jump-back helpers with legacy data support on load and save.
Changes
Editor (
InVideoQuizEditor/index.jsx)01:30)Data layer (
inVideoQuiz.js)normalizeProblemIds()— handle string or array timemap valuesexpandTimemapToQuizItems()— load legacy + multi-problem timemaps into editor rowsbuildTimemapFromQuizItems()— save single string or array per timestampbuildJumpBackFromQuizItems()— save jump-back keyed by problem IDnormalizeJumpBackField()/resolveQuizItemJumpBack()— legacy global MM:SS, time-keyed, and per-problem mapsparseJumpBackField()— parse legacy plain jump-back strings from studio_view HTMLTests
inVideoQuiz.test.js— 19 tests for timemap/jump-back helpersInVideoQuizEditor/index.test.jsx— save allowed with duplicate timestampsSupported data formats
{"1:30": "id1"}{"1:30": ["id1", "id2"]}{"1:30": "1:29"}{"id1": "1:29", "id2": "1:45"}Test plan
npm test -- inVideoQuizpassesnpm test -- InVideoQuizEditorpasses01:30with different jump-backs → Save succeeds