Make Q&A upvote budget a share of the questions
The fixed number of votes per person does not fit varying question counts. The budget is now `upvote_share` percent of the questions (rounded up, at least one), so it grows with the number of questions. A migration converts existing Q&A slides (no voting stays off, others get 25 %). On the stage the voting step no longer lists the questions but points participants to their devices. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3762b880cb
commit
575fb8649d
14 files changed
+171
-76
No files matched your search
@@ -301,14 +301,20 @@ $optionsError = $slide->getError('options_text');
|
||||
$upvoteOptions[$n] = __n('{0} Stimme', '{0} Stimmen', $n, $n);
|
||||
}
|
||||
?>
|
||||
<?= $this->Form->control('settings.max_upvotes', [
|
||||
<?php
|
||||
$shareOptions = [];
|
||||
foreach (\App\Model\Entity\Slide::QA_UPVOTE_SHARES as $share) {
|
||||
$shareOptions[$share] = __('{0} % der Fragen', $share);
|
||||
}
|
||||
?>
|
||||
<?= $this->Form->control('settings.upvote_share', [
|
||||
'type' => 'select',
|
||||
'options' => [0 => __('keine – ohne Abstimmung')] + $upvoteOptions,
|
||||
'label' => __('Upvotes (Stimmen) pro Person'),
|
||||
'value' => $settings['max_upvotes'],
|
||||
'options' => [0 => __('keine – ohne Abstimmung')] + $shareOptions,
|
||||
'label' => __('Stimmen pro Person'),
|
||||
'value' => $settings['upvote_share'],
|
||||
'aria-describedby' => 'qa-upvotes-hint',
|
||||
]) ?>
|
||||
<p class="hint" id="qa-upvotes-hint"><?= __('So viele Stimmen hat jede Person beim Abstimmen. Sie lassen sich auf Fragen anderer verteilen. Mit „keine“ entfällt die Abstimmung: Nach dem Sammeln werden die Fragen in der Reihenfolge besprochen, in der sie eingegangen sind.') ?></p>
|
||||
<p class="hint" id="qa-upvotes-hint"><?= __('Die Zahl der Stimmen hängt von der Zahl der Fragen ab: Bei 25 % und 12 Fragen hat jede Person 3 Stimmen (immer mindestens eine). Sie lassen sich auf Fragen anderer verteilen. Mit „keine“ entfällt die Abstimmung: Nach dem Sammeln werden die Fragen in der Reihenfolge besprochen, in der sie eingegangen sind.') ?></p>
|
||||
<?= $this->Form->control('settings.max_upvotes_per_question', [
|
||||
'type' => 'select',
|
||||
'options' => [0 => __('unbegrenzt (bis alle Stimmen vergeben sind)')] + $upvoteOptions,
|
||||
|
||||
Reference in new issue
Block a user