✨ Refactor quiz attempt details review and summary#2416
Open
b-l-i-n-d wants to merge 24 commits intov4-quiz-layout-singlefrom
Open
✨ Refactor quiz attempt details review and summary#2416b-l-i-n-d wants to merge 24 commits intov4-quiz-layout-singlefrom
b-l-i-n-d wants to merge 24 commits intov4-quiz-layout-singlefrom
Conversation
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.
Summary
This PR modernizes the quiz attempt details experience and aligns review rendering with the new learning-area UI system. It introduces reusable shared components for attempt details, consolidates question-level review rendering, and updates summary/side panel behavior so learners see accurate attempt-specific data and clear correctness states.
Problem
The existing attempt details implementation had several user-facing and maintainability issues:
Root Cause
The previous structure mixed concerns between active quiz-taking templates and review-only attempt details. There was no fully centralized shared attempt-details component set, and attempt selection relied on fallback model queries instead of URL-first resolution. In addition, summary sidebar scrolling used default browser alignment behavior that did not account for sticky header offset.
What Changed
Shared component architecture
templates/shared/components/quiz/attempt-details/review-answersfor consistent naming.Read-only review templates
Added dedicated non-interactive review templates for attempt details:
review-answer-dnd.php(image answering, ordering, matching)true-false.phpmultiple-choice.phpopen-ended.phpfill-in-the-blank.phpThese templates now render correctness state and structure specifically for review mode rather than reusing interactive behavior.
Question status and header consistency
Correct,Incorrect,Pending) based on answer correctness and manual-review question types.Attempt resolution and routing correctness
attempt_idfrom URL (?attempt_id=...&action=view_details) first.Instructor feedback in summary
instructor_feedbackfrom attempt info and renders it conditionally when present._quiz-summary.scssto match quiz summary design language.Styling updates
Sidebar question navigation behavior
summary-sidebar.ts) to:User Impact
Learners and reviewers now see:
Validation
php -l) during implementation.