Walk through Q&A stages with "next" before leaving the slide
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7475f096ea
commit
d1d748f760
3 files changed
+28
-9
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user