Hide quiz answer options on stage until the quiz starts
CI / Deploy / PHP 8.4 (push) Successful in 1m16s
CI / Deploy / PHP 8.5 (push) Successful in 1m17s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-13 08:33:56 +01:00
1 parent 19320f01c4
commit 28bfd535f4
3 files changed
+24 -1

No files matched your search

+6
View File
@@ -182,6 +182,12 @@ class ResultsService
'remaining' => $phase === Slide::QUIZ_RUNNING ? $slide->remainingSeconds() : null,
'revealed' => $phase === Slide::QUIZ_FINISHED,
];
if ($phase === Slide::QUIZ_READY) {
// Answers are only shown once the quiz has been started.
$result['options'] = [];
return $result;
}
if ($phase !== Slide::QUIZ_FINISHED) {
$result['options'] = array_map(fn($option) => [
'id' => $option->id,