Add "Keine Angabe" to scales and an "Enthaltung" shortcut for choice slides
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:
1 parent
1b48ce7852
commit
d6432911ed
14 files changed
+195
-11
No files matched your search
@@ -9,6 +9,7 @@
|
||||
* @var array<string, mixed> $state
|
||||
* @var string $participantHash Seed for the shuffled items of ordering slides
|
||||
* @var string|null $ownText Own open answer or scale comment (editable while voting is open)
|
||||
* @var bool $skipped Whether the participant answered the scale with "Keine Angabe"
|
||||
* @var int $pollIntervalMs
|
||||
*/
|
||||
use App\Service\VoteService;
|
||||
@@ -241,7 +242,7 @@ $countdown = function (?int $remaining): string {
|
||||
</div>
|
||||
<?php elseif ($state['hasResponded']) : ?>
|
||||
<p class="done">✓ <?= __('Deine Antwort ist angekommen.') ?></p>
|
||||
<?php if (VoteService::hasEditableText($slide) && $slide->isVotingOpen()) :
|
||||
<?php if (VoteService::hasEditableText($slide) && $slide->isVotingOpen() && !$skipped) :
|
||||
$isOpen = $slide->type === 'open'; ?>
|
||||
<?php if ($ownText !== null) : ?>
|
||||
<p class="own-comment__label"><?= $isOpen ? __('Deine Antwort:') : __('Dein Kommentar:') ?></p>
|
||||
@@ -342,6 +343,12 @@ $countdown = function (?int $remaining): string {
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $this->Form->button(__('Absenden'), ['class' => 'button button--primary button--block']) ?>
|
||||
<?php if ($slide->type === 'scale' && $slide->setting('allow_skip')) : ?>
|
||||
<?= $this->Form->button(__('Keine Angabe'), [
|
||||
'name' => 'skip', 'value' => '1', 'formnovalidate' => true,
|
||||
'class' => 'button button--block button--skip',
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?= $this->Form->end() ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in new issue
Block a user