Add internal feedback and comments to choice slides
CI / Deploy / test (push) Successful in 55s
CI / Deploy / deploy (push) Skipped

Same options as for scales: "private" shows only the number of votes on
the stage, "comments" adds an optional comment field whose comments
rotate in the presentation, "comment_ratings" shows the chosen answer(s)
next to each comment. With multiple choice the comment is stored on the
participant's first row. Settings and participant fields are shared
elements for scale and choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-08 18:57:35 +01:00
1 parent 3e09906830
commit 547b564e32
18 files changed
+485 -108

No files matched your search

+14 -11
View File
@@ -55,7 +55,7 @@ src/
HomeController Startseite, Anlegen (/create), Bestätigung, Join, Recover
AdminAppController Basis für /admin/{token}: löst Poll über Token-Hash auf (404 sonst), setzt Privacy-Header
AdminController Dashboard, Settings, Present, State-JSON, Control, QR, CSV-Export, Token rotieren, Löschen
SlidesController Folien-CRUD, Antworten offener Fragen bzw. Skala-Auswertung (`answers`), Sortieren (Drag & Drop/Pfeiltasten via `reorder`, JSON; erfordert JS), Antworten zurücksetzen,
SlidesController Folien-CRUD, Antworten offener Fragen bzw. Auswertung von Skala/Umfrage (`answers`), Sortieren (Drag & Drop/Pfeiltasten via `reorder`, JSON; erfordert JS), Antworten zurücksetzen,
YouTube-Link prüfen (`youtubeCheck`, JSON)
ParticipateController /p/{code}: Ansicht, State-JSON, Abstimmen; anonymes Cookie plenario_pid
EmbedController /e/{key}/{id}: eine Folie zum Einbetten (z. B. Canva), activate/heartbeat/pause/control
@@ -92,7 +92,7 @@ tests/ PHPUnit; PlenarioTestTrait erzeugt Testdaten, Fixtures
Mehrfachauswahl/mehrere Wörter = mehrere Zeilen mit gleichem `participant_hash`.
Q&A: Frage = Zeile mit `text_value`, Upvote = Zeile mit `parent_id` (= id der Frage, FK mit CASCADE).
Reihenfolge: eine Zeile pro Person, `text_value` = Options-ids kommagetrennt (`VoteService::parseOrder()`).
Skala: `numeric_value`, optional Kommentar in `text_value`.
Skala: `numeric_value`, optional Kommentar in `text_value`; Umfrage: Kommentar in `text_value` der ersten Zeile.
### Zentrale Regeln (nicht versehentlich brechen)
@@ -169,15 +169,18 @@ tests/ PHPUnit; PlenarioTestTrait erzeugt Testdaten, Fixtures
Presenter-/Embed-JSON (`results.answers` leer, nur `participants`) und nie bei Teilnehmenden (keine `results`,
unabhängig von `show_results_to_participants`). Lesen nur in der Verwaltung (`slides:answers`,
`ResultsService::answers()`) und im CSV-Export.
- **Internes Feedback** (Skala mit Setting `private`, ebenfalls `Slide::isPrivate()`): Presenter-/Embed-JSON enthält
`buckets: []` und `average: null` (nur `participants`), Teilnehmende bekommen keine `results`. Verteilung und
Durchschnitt nur in der Verwaltung (`slides:answers` → „Auswertung“, `ResultsService::scaleResults()`) und im CSV-Export.
- **Skala-Kommentare** (Setting `comments`, `Slide::hasComments()`): optionales Feld `comment`, gespeichert als `text_value`
in derselben Zeile wie `numeric_value` (ohne Setting wird es ignoriert). Öffentliche Skalen liefern im Presenter-/Embed-State
`results.comments` (Teilnehmende bekommen immer `[]`, `PollStateService::participantResults()`)
(älteste zuerst, je `id`, `text`, `value` – `value` nur mit Setting `comment_ratings`, sonst `null`); `Comments` in `plenario.js` blättert sie automatisch durch („Kommentar X von N“,
vor/zurück/Pause, Zustand übersteht das Neu-Rendern beim Polling). Bei internem Feedback bleibt `comments` leer,
lesbar nur in der Auswertung (`ResultsService::comments()`) und im CSV-Export.
- **Internes Feedback** (Skala und Umfrage mit Setting `private`, ebenfalls `Slide::isPrivate()`): Presenter-/Embed-JSON
enthält kein Ergebnis (Skala `buckets: []`/`average: null`, Umfrage `options: []`, nur `participants`), Teilnehmende
bekommen keine `results`. Ergebnis nur in der Verwaltung (`slides:answers` → „Auswertung“,
`ResultsService::scaleResults()` / `choiceResults()`) und im CSV-Export.
- **Kommentare** (Skala und Umfrage, Setting `comments`, `Slide::hasComments()`): optionales Feld `comment`, gespeichert als
`text_value` in der (bei Mehrfachauswahl: ersten) Zeile der Antwort, ohne Setting ignoriert (`VoteService::comment()`).
Öffentliche Folien liefern im Presenter-/Embed-State `results.comments` (älteste zuerst, je `id`, `text`, `value` –
`value` = Bewertung bzw. gewählte Antwort(en), nur mit Setting `comment_ratings`, sonst `null`). Teilnehmende bekommen
immer `[]` (`PollStateService::participantResults()`). `Comments` in `plenario.js` blättert sie automatisch durch
(„Kommentar X von N“, vor/zurück/Pause, Zustand übersteht das Neu-Rendern beim Polling). Bei internem Feedback bleibt
`comments` leer, lesbar nur in der Auswertung (`ResultsService::comments()`) und im CSV-Export.
Formular-/Teilnehmerfelder: Elemente `feedback_settings` und `feedback_fields`.
### Neuen Folientyp hinzufügen (Checkliste)