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

+17
View File
@@ -6,6 +6,7 @@ namespace App\Controller;
use App\Model\Entity\Slide;
use App\Model\Table\SlidesTable;
use App\Service\QaService;
use App\Service\ResultsService;
use App\Service\YouTubeService;
use Cake\Http\Exception\NotFoundException;
use Cake\Http\Response;
@@ -158,6 +159,22 @@ class SlidesController extends AdminAppController
return $this->redirect($this->adminUrl());
}
/**
* All answers of an open question (also anonymous feedback, which is never shown on the stage).
*
* @param string $id Slide id
* @return void
*/
public function answers(string $id): void
{
$slide = $this->loadSlide($id);
if ($slide->type !== Slide::TYPE_OPEN) {
throw new NotFoundException(__('Folie nicht gefunden.'));
}
$this->set('slide', $slide);
$this->set('answers', (new ResultsService())->answers($slide));
}
/**
* Loads a slide that belongs to the current poll (404 otherwise).
*