Add duplicating slides
Copies question, description, settings and options (incl. correct quiz answers) directly behind the original, without responses. The copy starts like a new slide (Slide::startFresh()) and opens in the edit form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5b3fccde67
commit
e2f24877dd
7 files changed
+214
-5
No files matched your search
@@ -408,6 +408,21 @@ class Slide extends Entity
|
||||
return max(0, $this->voting_ends_at->getTimestamp() - ($now ?? DateTime::now())->getTimestamp());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the state of a slide that has not been presented yet (new slide, copy):
|
||||
* a quiz waits for the presenter to start it, Q&A collects questions, others are open.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function startFresh(): void
|
||||
{
|
||||
$this->is_voting_open = !$this->isQuiz();
|
||||
$this->voting_started_at = null;
|
||||
$this->voting_ends_at = null;
|
||||
$this->stage = $this->isQa() ? self::QA_COLLECT : null;
|
||||
$this->focus_response_id = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens or closes voting. Opening a quiz that is not running (re)starts its
|
||||
* voting window and timer; opening a running quiz changes nothing.
|
||||
|
||||
Reference in new issue
Block a user