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
@@ -172,7 +172,11 @@ class SlidesTable extends Table
|
||||
break;
|
||||
case Slide::TYPE_QA:
|
||||
$max = (int)($input['max_upvotes'] ?? $settings['max_upvotes']);
|
||||
$settings['max_upvotes'] = max(1, min(Slide::QA_MAX_UPVOTES, $max));
|
||||
// 0 = no upvotes (no voting stage)
|
||||
$settings['max_upvotes'] = max(0, min(Slide::QA_MAX_UPVOTES, $max));
|
||||
$perQuestion = (int)($input['max_upvotes_per_question'] ?? $settings['max_upvotes_per_question']);
|
||||
// 0 = no limit per question
|
||||
$settings['max_upvotes_per_question'] = max(0, min(Slide::QA_MAX_UPVOTES, $perQuestion));
|
||||
$settings['allow_self_upvote'] = filter_var($input['allow_self_upvote'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
break;
|
||||
case Slide::TYPE_YOUTUBE:
|
||||
|
||||
Reference in new issue
Block a user