Add anonymous feedback option for open questions
Open questions can be marked private: the presenter screen and embeds only show the number of answers, participants never see results, and the texts are readable on a new admin answers page and in the CSV. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
07a292d109
commit
367ff8548d
14 files changed
+310
-12
No files matched your search
@@ -97,6 +97,7 @@ $url = fn(string $name, array $params = []) => ['_name' => $name, 'token' => $ad
|
||||
'discuss' => __('Fragen werden besprochen'),
|
||||
][$slide->qaStage()]) ?> · <?= __n('max. {0} Upvote pro Person', 'max. {0} Upvotes pro Person', (int)$slide->setting('max_upvotes'), (int)$slide->setting('max_upvotes')) ?></span>
|
||||
<?php elseif (!$slide->is_voting_open) : ?><span class="muted">· <?= __('Abstimmung geschlossen') ?></span><?php endif; ?>
|
||||
<?php if ($slide->isPrivate()) : ?><span class="badge" title="<?= __('Antworten werden nicht öffentlich angezeigt') ?>">🔒 <?= __('anonym') ?></span><?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<a class="slide-item__title" href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"><?= h($slide->question) ?></a>
|
||||
@@ -126,6 +127,9 @@ $url = fn(string $name, array $params = []) => ['_name' => $name, 'token' => $ad
|
||||
'title' => __('Diese Folie jetzt den Teilnehmenden zeigen'),
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($slide->type === 'open' && $count > 0) : ?>
|
||||
<a class="button button--small" href="<?= $this->Url->build($url('slides:answers', ['id' => $slide->id])) ?>"><?= __('Antworten') ?></a>
|
||||
<?php endif; ?>
|
||||
<a class="button button--small" href="<?= $this->Url->build($url('slides:edit', ['id' => $slide->id])) ?>"><?= __('Bearbeiten') ?></a>
|
||||
<?php if ($count > 0) : ?>
|
||||
<?= $this->Form->postLink(__('Zurücksetzen'), $url('slides:reset', ['id' => $slide->id]), [
|
||||
|
||||
@@ -190,7 +190,13 @@ $countdown = function (?int $remaining): string {
|
||||
|
||||
<?php elseif ($slide->type === 'open') : ?>
|
||||
<textarea name="text" rows="4" maxlength="500" required
|
||||
<?= $slide->isPrivate() ? 'aria-describedby="private-hint"' : '' ?>
|
||||
placeholder="<?= __('Deine Antwort …') ?>"></textarea>
|
||||
<?php if ($slide->isPrivate()) : ?>
|
||||
<p class="hint private-hint" id="private-hint">
|
||||
🔒 <?= __('Anonymes Feedback: Deine Antwort wird nicht öffentlich angezeigt und nicht mit deinem Namen gespeichert.') ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php elseif ($slide->type === 'scale') : ?>
|
||||
<div class="scale">
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* All answers of an open question – the only place where anonymous feedback
|
||||
* (private open questions) can be read, besides the CSV export.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Poll $poll
|
||||
* @var string $adminToken
|
||||
* @var \App\Model\Entity\Slide $slide
|
||||
* @var list<array{text: string, created: string}> $answers
|
||||
*/
|
||||
use Cake\I18n\DateTime;
|
||||
|
||||
$this->assign('title', $slide->question);
|
||||
$this->assign('noindex', '1');
|
||||
$count = count($answers);
|
||||
?>
|
||||
<p><a href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>">← <?= __('Zurück zur Verwaltung') ?></a></p>
|
||||
|
||||
<section class="card">
|
||||
<p class="eyebrow">
|
||||
<?= h($slide->typeLabel()) ?>
|
||||
<?php if ($slide->isPrivate()) : ?>· 🔒 <?= __('Anonymes Feedback') ?><?php endif; ?>
|
||||
</p>
|
||||
<h1><?= h($slide->question) ?></h1>
|
||||
<p class="muted"><?= __n('{0} Antwort, neueste zuerst', '{0} Antworten, neueste zuerst', $count, $count) ?></p>
|
||||
<?php if ($slide->isPrivate()) : ?>
|
||||
<p class="hint"><?= __('Diese Antworten werden weder in der Präsentation noch den Teilnehmenden angezeigt.') ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($answers === []) : ?>
|
||||
<p class="empty"><?= __('Noch keine Antworten.') ?></p>
|
||||
<?php else : ?>
|
||||
<ol class="answers-page" reversed>
|
||||
<?php foreach ($answers as $answer) :
|
||||
$created = new DateTime($answer['created']); ?>
|
||||
<li>
|
||||
<?= h($answer['text']) ?>
|
||||
<time datetime="<?= h($answer['created']) ?>"><?= h($created->i18nFormat('dd.MM.yyyy, HH:mm')) ?></time>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
@@ -128,6 +128,13 @@ $optionsError = $slide->getError('options_text');
|
||||
'label' => __('Mehrfachauswahl erlauben'),
|
||||
'checked' => (bool)$settings['multiple'],
|
||||
]) ?>
|
||||
<?php elseif ($slide->type === 'open') : ?>
|
||||
<?= $this->Form->control('settings.private', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Anonymes Feedback: Antworten nicht öffentlich anzeigen'),
|
||||
'checked' => (bool)$settings['private'],
|
||||
]) ?>
|
||||
<p class="hint"><?= __('Präsentation und Teilnehmende sehen nur, wie viele Antworten eingegangen sind. Die Texte siehst nur du hier in der Verwaltung (und im CSV-Export).') ?></p>
|
||||
<?php elseif ($slide->type === 'wordcloud') : ?>
|
||||
<?= $this->Form->control('settings.allow_upvotes', [
|
||||
'type' => 'checkbox',
|
||||
|
||||
Reference in new issue
Block a user