Merge pull request 'Let the presenter resume a paused poll with the pause button' (#38) from fix/presenter-resume into main
Reviewed-on: #38
This commit was merged in pull request #38.
This commit is contained in:
commit
e9e1159ad9
5 files changed
+52
-9
No files matched your search
@@ -188,7 +188,7 @@ class AdminController extends AdminAppController
|
||||
|
||||
/**
|
||||
* Presenter controls. Field `action`:
|
||||
* goto (+ slide_id), next, prev, stop (pause), and the slide actions of
|
||||
* goto (+ slide_id), next, prev, stop (pause), resume (continue after a pause), and the slide actions of
|
||||
* SlideControlService (open, close, toggle, stage, question).
|
||||
*
|
||||
* On a Q&A slide that is being discussed, next/prev step through the questions
|
||||
@@ -241,6 +241,12 @@ class AdminController extends AdminAppController
|
||||
case 'stop':
|
||||
$this->poll->pause();
|
||||
break;
|
||||
case 'resume':
|
||||
// Explicit (not a toggle), so a repeated click never pauses again.
|
||||
if ($index === false && in_array($this->poll->paused_slide_id, $ids, true)) {
|
||||
$this->poll->showSlide((int)$this->poll->paused_slide_id);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (!in_array($action, SlideControlService::ACTIONS, true)) {
|
||||
throw new BadRequestException('Unknown action');
|
||||
|
||||
Reference in new issue
Block a user