Show scale comments only in the presentation
CI / Deploy / test (push) Successful in 49s
CI / Deploy / deploy (push) Skipped

Participants still see distribution and average (if enabled), but the
comments are emptied in their state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 15:54:34 +01:00
1 parent 9b879ca177
commit d6166bd9d9
5 files changed
+42 -12

No files matched your search

+17 -1
View File
@@ -187,7 +187,7 @@ class PollStateService
$slide?->modified?->toUnixString() ?? 0,
]),
'slide' => $showResults ? $this->slidePayload($slide) : null,
'results' => $showResults ? $this->results->forSlide($slide) : null,
'results' => $showResults ? $this->participantResults($slide) : null,
'words' => $words,
'quiz' => $quiz,
'qa' => $qa,
@@ -195,6 +195,22 @@ class PollStateService
];
}
/**
* Results as participants see them: scale comments are for the presentation only.
*
* @param \App\Model\Entity\Slide $slide Current slide
* @return array<string, mixed>
*/
protected function participantResults(Slide $slide): array
{
$results = $this->results->forSlide($slide);
if (isset($results['comments'])) {
$results['comments'] = [];
}
return $results;
}
/**
* Ordering progress of one participant. Own answer and correctness only once
* revealed (voting closed); before that the state must not hint at the solution.