Add quiz slide type
Quiz slides have predefined answers with one or more marked as correct. The presenter starts the quiz, which then runs until its optional time limit expires or the presenter ends it. Counts and correct answers are only revealed once the quiz is finished; participants then see whether their answer was right. - migration: slide_options.is_correct, slides.voting_started_at/voting_ends_at - Slide::isVotingOpen() includes the quiz deadline, expired quizzes are closed lazily when the state is read - presenter countdown, quiz tiles and reveal with correct-answer summary - CSV export marks quiz answers as right/wrong Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
04cbc5bcd3
commit
fd8da4c16c
18 files changed
+999
-43
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Migrations\BaseMigration;
|
||||
|
||||
/**
|
||||
* Quiz slides: correct answer options and a timed voting window.
|
||||
*
|
||||
* slide_options.is_correct - marks the correct option(s) of a quiz
|
||||
* slides.voting_started_at - when the presenter started the quiz (null = not started yet)
|
||||
* slides.voting_ends_at - deadline of a timed quiz (null = closed manually by the presenter)
|
||||
*/
|
||||
class AddQuizToSlides extends BaseMigration
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
$this->table('slide_options')
|
||||
->addColumn('is_correct', 'boolean', ['null' => false, 'default' => false, 'after' => 'label'])
|
||||
->update();
|
||||
|
||||
$this->table('slides')
|
||||
->addColumn('voting_started_at', 'datetime', ['null' => true, 'default' => null, 'after' => 'is_voting_open'])
|
||||
->addColumn('voting_ends_at', 'datetime', ['null' => true, 'default' => null, 'after' => 'voting_started_at'])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user