Walk through Q&A stages with "next" before leaving the slide
CI / Deploy / PHP 8.5 (push) Successful in 1m14s
CI / Deploy / PHP 8.4 (push) Successful in 1m19s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-21 13:47:27 +01:00
1 parent 7475f096ea
commit d1d748f760
3 files changed
+28 -9

No files matched your search

+7 -7
View File
@@ -341,13 +341,13 @@ class AdminController extends AdminAppController
$ids = array_map(fn(Slide $s) => $s->id, $slides);
$index = array_search($this->poll->current_slide_id, $ids, true);
$current = $index === false ? null : $slides[$index];
if (
$current !== null
&& $current->isQa()
&& in_array($action, ['next', 'prev'], true)
&& (new QaService())->moveFocus($current, $action === 'next' ? 1 : -1)
) {
$action = 'none';
// Q&A: forward first walks through the stages (collect → vote → discuss), then through the questions,
// only after the last one it goes to the next slide. Back only steps through the questions.
if ($current !== null && $current->isQa() && in_array($action, ['next', 'prev'], true)) {
$qa = new QaService();
if ($qa->moveFocus($current, $action === 'next' ? 1 : -1) || ($action === 'next' && $qa->advance($current))) {
$action = 'none';
}
}
// Forward on a slide with a countdown (every quiz, any other slide with a time limit) is a build step too:
// start it, then end it, only then the next slide.