Remove the "voting open" checkbox from the slide form
is_voting_open is presenter state (SlideControlService), so the form never takes it over anymore, for all slide types instead of only quiz and Q&A. New slides start open (quiz closed), as before. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
83c76d72ec
commit
bb2d1443cf
4 files changed
+9
-16
No files matched your search
@@ -299,11 +299,8 @@ class SlidesController extends AdminAppController
|
||||
$data['type'] = $slide->type;
|
||||
// The upload is handled by prepareImage(); the marshaller must not see the file object.
|
||||
unset($data['image']);
|
||||
$fields = ['type', 'question', 'description', 'settings', 'is_voting_open'];
|
||||
if ($slide->isQuiz() || $slide->isQa()) {
|
||||
// Quiz and Q&A voting is controlled by the presenter only.
|
||||
$fields = array_values(array_diff($fields, ['is_voting_open']));
|
||||
}
|
||||
// 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];
|
||||
$this->Slides->patchEntity($slide, $data, ['fields' => $fields, 'associated' => []]);
|
||||
foreach ($youtube['errors'] as $field => $message) {
|
||||
|
||||
Reference in new issue
Block a user