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
@@ -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>
|
||||
Reference in new issue
Block a user