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:
1 parent
a138425ab0
commit
238797ecfd
15 files changed
+665
-23
No files matched your search
@@ -422,7 +422,12 @@ class VoteService
|
||||
if ($value === false || $value < $min || $value > $max) {
|
||||
throw new VoteException(__('Bitte wähle einen Wert zwischen {0} und {1}.', $min, $max));
|
||||
}
|
||||
// The optional comment is stored in the same row; ignored if the slide has no comment field.
|
||||
$comment = $slide->hasComments() ? trim((string)($data['comment'] ?? '')) : '';
|
||||
if (mb_strlen($comment) > self::MAX_TEXT_LENGTH) {
|
||||
throw new VoteException(__('Der Kommentar darf maximal {0} Zeichen lang sein.', self::MAX_TEXT_LENGTH));
|
||||
}
|
||||
|
||||
return [['numeric_value' => $value]];
|
||||
return [['numeric_value' => $value, 'text_value' => $comment === '' ? null : $comment]];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user