Allow Q&A rounds without upvotes and limit upvotes per question
- max_upvotes = 0 disables upvoting: the voting stage is skipped (collect -> discuss), questions are discussed in submission order - new setting max_upvotes_per_question caps a participant's upvotes on a single question (0 = no limit besides max_upvotes) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e44ded107
commit
bc86ec2db6
16 files changed
+235
-38
No files matched your search
@@ -5,6 +5,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Model\Entity\Slide;
|
||||
use App\Model\Table\SlidesTable;
|
||||
use App\Service\QaService;
|
||||
use App\Service\ResetService;
|
||||
use App\Service\ResultsService;
|
||||
use App\Service\YouTubeService;
|
||||
@@ -300,6 +301,10 @@ class SlidesController extends AdminAppController
|
||||
if ($slide->type === Slide::TYPE_CHOICE || $slide->isQuiz() || $slide->isOrder()) {
|
||||
$this->Slides->syncOptions($slide, $labels, $correct);
|
||||
}
|
||||
if ($slide->isQa() && $slide->qaStage() === Slide::QA_VOTE && !$slide->hasQaUpvotes()) {
|
||||
// Upvotes were switched off while voting: continue with the discussion.
|
||||
(new QaService())->setStage($slide, Slide::QA_DISCUSS);
|
||||
}
|
||||
if ($youtube['warning'] !== null) {
|
||||
$this->Flash->warning($youtube['warning']);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user