Add anonymous feedback option for open questions
CI / Deploy / test (push) Successful in 1m4s
CI / Deploy / deploy (push) Skipped

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:
gnilebeinandClaude Opus 5.5 committed 2026-11-07 16:28:47 +01:00
1 parent 07a292d109
commit 367ff8548d
14 files changed
+310 -12

No files matched your search

+13 -1
View File
@@ -81,7 +81,8 @@ class Slide extends Entity
self::TYPE_CHOICE => ['multiple' => false],
// allow_downvotes only takes effect together with allow_upvotes
self::TYPE_WORDCLOUD => ['allow_upvotes' => true, 'allow_downvotes' => true],
self::TYPE_OPEN => [],
// private: anonymous feedback, answers only visible in the admin area (never on the stage)
self::TYPE_OPEN => ['private' => false],
self::TYPE_SCALE => ['scale_min' => 1, 'scale_max' => 5, 'min_label' => '', 'max_label' => ''],
self::TYPE_CONTENT => [],
// time_limit in seconds, 0 = no limit (presenter ends the quiz)
@@ -327,4 +328,15 @@ class Slide extends Entity
{
return $this->getSettings()[$key] ?? null;
}
/**
* Open question collecting anonymous feedback: answers are never shown on the
* presenter screen or to participants, only in the admin area and the CSV export.
*
* @return bool
*/
public function isPrivate(): bool
{
return $this->type === self::TYPE_OPEN && (bool)$this->setting('private');
}
}