Add "Keine Angabe" to scales and an "Enthaltung" shortcut for choice slides
CI / Deploy / PHP 8.5 (push) Successful in 1m38s
CI / Deploy / PHP 8.4 (push) Successful in 1m39s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

Scales and star ratings get an optional "Keine Angabe" answer (setting
allow_skip). It counts as taking part but stays out of the average and
the distribution; the number is shown separately on stage, in the
evaluation and in the PDF. The choice form gets a button that appends an
"Enthaltung" option.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-21 12:39:44 +01:00
1 parent 1b48ce7852
commit d6432911ed
14 files changed
+195 -11

No files matched your search

+5 -2
View File
@@ -93,11 +93,14 @@ class ParticipateController extends AppController
$slide = $poll->is_active ? $stateService->currentSlide($poll) : null;
$participantHash = $this->participantHash($poll);
$state = $stateService->forParticipant($poll, $participantHash, $slide);
$voteService = new VoteService();
$ownText = $slide !== null && VoteService::hasEditableText($slide) && $state['hasResponded']
? (new VoteService())->ownText($slide, $participantHash)
? $voteService->ownText($slide, $participantHash)
: null;
// "Keine Angabe" has no rating to comment on
$skipped = $slide !== null && $state['hasResponded'] && $voteService->hasSkipped($slide, $participantHash);
$this->set(compact('poll', 'slide', 'state', 'participantHash', 'ownText'));
$this->set(compact('poll', 'slide', 'state', 'participantHash', 'ownText', 'skipped'));
$this->setPollInterval();
}