Skip to content

Skip required validation for revealed answers - #3107

Merged
shewa12 merged 4 commits into
4.2.0from
fix-quiz-empty-submission
Oct 19, 2026
Merged

shewa12 merged 4 commits into
4.2.0from
fix-quiz-empty-submission

Conversation

@sazedul-haque

Copy link
Copy Markdown
Collaborator

No description provided.

Replace the direct SUM query with QuizModel::get_attempt_answers_stats() to retrieve an attempt's total earned marks.
Cast float values to strings before splitting and default missing decimal digits to zero, preventing errors for whole-number floats and values without a decimal point.
Treat committed quiz answers as revealed and exempt them from required-answer validation, so users can continue without re-answering questions they've already submitted.
Build the content bank flag map only for questions with an ID and use safe empty checks when filtering question and answer payloads, avoiding undefined-index notices.
@sazedul-haque
sazedul-haque requested a review from shewa12 October 19, 2026 10:42
@shewa12
shewa12 merged commit afca6c5 into 4.2.0 Oct 19, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants