Keep results off participant devices
CI / Deploy / test (push) Successful in 1m9s
CI / Deploy / deploy (push) Skipped

Results belong on the stage. Participants only get results where they
interact with them (word cloud with upvotes) and, once resolved, the
solution of quiz and ordering slides with their own verdict, without
counts or distribution. Removes the per-poll setting
show_results_to_participants (column stays unused).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 20:02:36 +01:00
1 parent ecb8f9d31c
commit cfb445123e
14 files changed
+86 -59

No files matched your search

+5 -4
View File
@@ -170,14 +170,15 @@ class QuizTest extends TestCase
$this->assertSame(['Berlin', true, 2], [$results['options'][0]['label'], $results['options'][0]['correct'], $results['options'][0]['count']]);
$this->assertFalse($results['options'][1]['correct']);
// Revealed to participants even without show_results_to_participants.
$poll->show_results_to_participants = false;
$this->pollsTable()->saveOrFail($poll);
// Participants get the solution and their own verdict, but no distribution.
$state = $this->participantState($poll, 'p2');
$this->assertSame('finished', $state['quiz']['phase']);
$this->assertFalse($state['quiz']['isCorrect']);
$this->assertSame($this->optionId($slide, 'Hamburg'), $state['quiz']['answerId']);
$this->assertNotNull($state['results']);
$this->assertSame([true, false], array_slice(array_column($state['results']['options'], 'correct'), 0, 2));
$this->assertArrayNotHasKey('correctCount', $state['results']);
$this->assertArrayNotHasKey('count', $state['results']['options'][0]);
$this->assertArrayNotHasKey('percent', $state['results']['options'][0]);
$this->assertTrue($this->participantState($poll, 'p1')['quiz']['isCorrect']);
$this->assertNull($this->participantState($poll, 'nobody')['quiz']['isCorrect']);
}