Add internal feedback and comments to choice slides
CI / Deploy / test (push) Successful in 55s
CI / Deploy / deploy (push) Skipped

Same options as for scales: "private" shows only the number of votes on
the stage, "comments" adds an optional comment field whose comments
rotate in the presentation, "comment_ratings" shows the chosen answer(s)
next to each comment. With multiple choice the comment is stored on the
participant's first row. Settings and participant fields are shared
elements for scale and choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 18:57:35 +01:00
1 parent 3e09906830
commit 547b564e32
18 files changed
+485 -108

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
<?php
/**
* Optional comment field and internal-feedback hint below a scale or choice on the participant page.
*
* @var \App\View\AppView $this
* @var \App\Model\Entity\Slide $slide Scale or choice slide
* @var string $placeholder Placeholder of the comment field
*/
?>
<?php if ($slide->hasComments()) : ?>
<label class="comment-label" for="feedback-comment"><?= __('Kommentar (optional)') ?></label>
<textarea id="feedback-comment" name="comment" rows="3" maxlength="500"
placeholder="<?= h($placeholder) ?>"></textarea>
<?php endif; ?>
<?php if ($slide->isPrivate()) : ?>
<p class="hint private-hint" id="private-hint">
🔒 <?= __('Internes Feedback: Das Ergebnis wird nicht öffentlich angezeigt und deine Antwort nicht mit deinem Namen gespeichert.') ?>
</p>
<?php endif; ?>
+26
View File
@@ -0,0 +1,26 @@
<?php
/**
* Settings "comment field" and "internal feedback" of a scale or choice slide.
*
* @var \App\View\AppView $this
* @var array<string, mixed> $settings Current settings
* @var string $ratingLabel Label of the setting comment_ratings
*/
?>
<?= $this->Form->control('settings.comments', [
'type' => 'checkbox',
'label' => __('Kommentarfeld anzeigen (Teilnehmende können ihre Antwort optional begründen)'),
'checked' => (bool)$settings['comments'],
]) ?>
<p class="hint"><?= __('Die Kommentare laufen in der Präsentation nacheinander durch (nicht bei den Teilnehmenden). Bei internem Feedback siehst du sie nur in der Auswertung.') ?></p>
<?= $this->Form->control('settings.comment_ratings', [
'type' => 'checkbox',
'label' => $ratingLabel,
'checked' => (bool)$settings['comment_ratings'],
]) ?>
<?= $this->Form->control('settings.private', [
'type' => 'checkbox',
'label' => __('Internes Feedback: Ergebnis nicht öffentlich anzeigen'),
'checked' => (bool)$settings['private'],
]) ?>
<p class="hint"><?= __('Präsentation und Teilnehmende sehen nur, wie viele abgestimmt haben. Das Ergebnis und die Kommentare siehst nur du hier in der Verwaltung (und im CSV-Export).') ?></p>