Add an optional countdown to every slide that collects answers
CI / Deploy / PHP 8.4 (push) Successful in 1m18s
CI / Deploy / PHP 8.5 (push) Successful in 1m29s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Choice, word cloud, open question, scale and ordering slides get a time
limit like the quiz. With a limit the slide waits ("ready") showing only
the question; next starts the countdown, the next one ends it, the third
moves on. Stage results and the ordering solution are withheld until the
countdown has started. The countdown music plays during any countdown.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-21 12:18:33 +01:00
1 parent 722e845cff
commit 27771e7470
19 files changed
+480 -34

No files matched your search

+6
View File
@@ -302,7 +302,13 @@ class SlidesController extends AdminAppController
// is_voting_open is presenter state (SlideControlService), never editable via the form.
$fields = ['type', 'question', 'description', 'settings'];
$youtube = $slide->isYouTube() ? $this->prepareYouTube($data) : ['errors' => [], 'warning' => null];
// A slide that has not been presented yet starts again after the (possibly changed) time limit is known:
// with a countdown it waits for the presenter, without it is open.
$fresh = $slide->isNew() || $slide->isFresh();
$this->Slides->patchEntity($slide, $data, ['fields' => $fields, 'associated' => []]);
if ($fresh) {
$slide->startFresh();
}
foreach ($youtube['errors'] as $field => $message) {
$slide->setError($field, $message);
}