feat: conditionally hide correct_answers count based on show_answers_after_completion setting

Update quiz submission response to respect the show_answers_after_completion setting by conditionally including the correct_answers count. When show_answers_after_completion is false, correct_answers is now undefined instead of being exposed.
This commit is contained in:
JakkrapartXD 2026-01-30 17:51:33 +07:00
parent bf5d939910
commit 4ff57555a2
2 changed files with 6 additions and 3 deletions

View file

@ -351,7 +351,7 @@ export interface SubmitQuizResponse {
score: number;
total_score: number;
total_questions: number;
correct_answers: number;
correct_answers?: number;
is_passed: boolean;
passing_score: number;
attempt_number: number;