Allow Q&A rounds without upvotes and limit upvotes per question
CI / Deploy / test (push) Successful in 57s
CI / Deploy / deploy (push) Skipped

- 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:
gnilebeinandClaude Opus 5.5 committed 2026-11-09 08:36:02 +01:00
1 parent 3e44ded107
commit bc86ec2db6
16 files changed
+235 -38

No files matched your search

+5
View File
@@ -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']);
}