Add internal feedback and comments to scale slides

- Setting "private": distribution and average are only shown in the
  admin evaluation page and CSV export, the stage shows just the count.
- Setting "comments": optional comment field for participants; on public
  scales the comments rotate on the results ("Kommentar X von N") with
  previous/next/pause controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 15:52:55 +01:00
1 parent a138425ab0
commit 238797ecfd
15 files changed
+665 -23

No files matched your search

+2
View File
@@ -310,6 +310,8 @@ class AdminController extends AdminAppController
$response->slide_option_id !== null => $labels[$response->slide_option_id] ?? '',
$response->text_value !== null && $response->numeric_value === VoteService::DOWNVOTE
=> __('Downvote: {0}', $response->text_value),
$slide->type === Slide::TYPE_SCALE && $response->text_value !== null
=> __('{0} (Kommentar: {1})', $response->numeric_value, $response->text_value),
$response->numeric_value !== null => (string)$response->numeric_value,
default => (string)$response->text_value,
};
+7 -3
View File
@@ -164,7 +164,8 @@ class SlidesController extends AdminAppController
}
/**
* All answers of an open question (also anonymous feedback, which is never shown on the stage).
* All answers of an open question or the ratings of a scale
* (also anonymous/internal feedback, which is never shown on the stage).
*
* @param string $id Slide id
* @return void
@@ -172,11 +173,14 @@ class SlidesController extends AdminAppController
public function answers(string $id): void
{
$slide = $this->loadSlide($id);
if ($slide->type !== Slide::TYPE_OPEN) {
if (!in_array($slide->type, [Slide::TYPE_OPEN, Slide::TYPE_SCALE], true)) {
throw new NotFoundException(__('Folie nicht gefunden.'));
}
$results = new ResultsService();
$this->set('slide', $slide);
$this->set('answers', (new ResultsService())->answers($slide));
$this->set('answers', $slide->type === Slide::TYPE_OPEN ? $results->answers($slide) : []);
$this->set('scale', $slide->type === Slide::TYPE_SCALE ? $results->scaleResults($slide) : null);
$this->set('comments', $slide->hasComments() ? $results->comments($slide) : []);
}
/**