Hide quiz answer options on stage until the quiz starts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19320f01c4
commit
28bfd535f4
3 files changed
+24
-1
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user