Merge pull request 'Close an open ordering slide on "next" before moving on' (#116) from fix/order-next-reveals into main
Reviewed-on: #116
This commit was merged in pull request #116.
This commit is contained in:
commit
cad09163d9
3 files changed
+27
-1
No files matched your search
@@ -274,7 +274,8 @@ class AdminController extends AdminAppController
|
||||
*
|
||||
* On a Q&A slide that is being discussed, next/prev step through the questions
|
||||
* first (like builds in presentation software); on a quiz, next starts it and then ends it
|
||||
* before moving on, prev always goes to the previous slide. While paused, next/prev resume
|
||||
* before moving on, on an open ordering slide next closes it (reveals the solution),
|
||||
* prev always goes to the previous slide. While paused, next/prev resume
|
||||
* the slide that was live before.
|
||||
*
|
||||
* Answers with the new state as JSON for XHR requests, otherwise redirects back.
|
||||
@@ -308,6 +309,12 @@ class AdminController extends AdminAppController
|
||||
}
|
||||
}
|
||||
|
||||
// Same for an ordering slide: forward first closes the voting (reveals the solution).
|
||||
if ($current !== null && $current->isOrder() && $action === 'next' && $current->isVotingOpen()) {
|
||||
(new SlideControlService())->apply($current, 'close');
|
||||
$action = 'none';
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
case 'none':
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user