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

+3 -2
View File
@@ -211,14 +211,15 @@ $bar = function (float $percent, bool $ok = false): string {
<?php if ($r['questions'] === []) : ?>
<p class="empty"><?= __('Keine Fragen eingereicht.') ?></p>
<?php else : ?>
<?php $withUpvotes = $r['maxUpvotes'] > 0; ?>
<table>
<thead><tr><th class="num">#</th><th><?= __('Frage') ?></th><th class="num"><?= __('Upvotes') ?></th></tr></thead>
<thead><tr><th class="num">#</th><th><?= __('Frage') ?></th><?php if ($withUpvotes) : ?><th class="num"><?= __('Upvotes') ?></th><?php endif; ?></tr></thead>
<tbody>
<?php foreach ($r['questions'] as $i => $question) : ?>
<tr>
<td class="num"><?= $i + 1 ?>.</td>
<td><?= nl2br(h($question['text'])) ?></td>
<td class="num"><?= (int)$question['votes'] ?></td>
<?php if ($withUpvotes) : ?><td class="num"><?= (int)$question['votes'] ?></td><?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>