Add personal ranking mode to order slides and show image placement only with an image
Order slides get a "ranking" setting without a correct solution: the stage shows the live average ranking, participants only get a confirmation. The image placement question in the slide form is only shown for an existing image or a chosen file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
85627b364d
commit
0aac113f30
15 files changed
+239
-15
No files matched your search
@@ -137,7 +137,26 @@ $bar = function (float $percent, bool $ok = false): string {
|
||||
<?php endif; ?>
|
||||
|
||||
<?php elseif ($slide->type === 'order') : ?>
|
||||
<?php if (!$r['revealed']) : ?>
|
||||
<?php if (!empty($r['ranking'])) : ?>
|
||||
<?php if ($participants === 0) : ?>
|
||||
<p class="empty"><?= __('Noch keine Antworten') ?></p>
|
||||
<?php else : ?>
|
||||
<p><span class="stat"><?= (int)$participants ?></span> <?= __('persönliche Rangfolgen, sortiert nach durchschnittlichem Platz') ?></p>
|
||||
<table>
|
||||
<thead><tr><th class="num"><?= __('Rang') ?></th><th><?= __('Eintrag') ?></th><th class="num"><?= __('Ø Platz') ?></th><th></th></tr></thead>
|
||||
<tbody>
|
||||
<?php foreach ($r['items'] as $item) : ?>
|
||||
<tr>
|
||||
<td class="num"><?= (int)$item['position'] ?>.</td>
|
||||
<td><?= h($item['label']) ?></td>
|
||||
<td class="num"><?= $number((float)$item['average'], 1) ?></td>
|
||||
<td class="bar"><?= $bar((float)$item['score'], true) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?php elseif (!$r['revealed']) : ?>
|
||||
<p class="empty"><?= __('Die Abstimmung ist noch offen, die Auflösung gibt es erst nach dem Schließen.') ?></p>
|
||||
<?php else : ?>
|
||||
<p><span class="stat"><?= __('{0} von {1}', (int)$r['correctCount'], $participants) ?></span> <?= __('komplett richtig sortiert') ?></p>
|
||||
|
||||
@@ -118,6 +118,8 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
|
||||
$perQuestion = (int)$slide->setting('max_upvotes_per_question'); ?>
|
||||
<?= __('Stimmen für {0} % der Fragen pro Person', (int)$slide->setting('upvote_share')) ?><?= $perQuestion > 0 ? ' · ' . __n('{0} pro Frage', '{0} pro Frage', $perQuestion, $perQuestion) : '' ?><?= $slide->setting('allow_self_upvote') ? ' · ' . __('auch für eigene Fragen') : '' ?>
|
||||
<?php endif; ?></span>
|
||||
<?php elseif ($slide->isRanking()) : ?>
|
||||
<span class="muted">· <?= $slide->is_voting_open ? __('Persönliche Rangfolge') : __('Persönliche Rangfolge, Abstimmung geschlossen') ?></span>
|
||||
<?php elseif ($slide->isOrder() && !$slide->is_voting_open) : ?>
|
||||
<span class="muted">· <?= __('Abstimmung geschlossen, aufgelöst') ?></span>
|
||||
<?php elseif (!$slide->is_voting_open) : ?><span class="muted">· <?= __('Abstimmung geschlossen') ?></span><?php endif; ?>
|
||||
@@ -134,7 +136,7 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
|
||||
$slide->slide_options,
|
||||
))) ?></p>
|
||||
<?php elseif ($slide->isOrder() && $slide->slide_options) : ?>
|
||||
<p class="slide-item__options muted"><?= h(implode(' → ', array_map(
|
||||
<p class="slide-item__options muted"><?= h(implode($slide->isRanking() ? ' · ' : ' → ', array_map(
|
||||
fn($o) => $o->label,
|
||||
$slide->slide_options,
|
||||
))) ?></p>
|
||||
|
||||
Reference in new issue
Block a user