Add a star rating style to scale slides
Scales can now be shown as stars (1 to n) instead of numbered steps: participants tap stars, the stage shows the average as partly filled stars and the distribution as bars from most to fewest stars, and the evaluation page and PDF export print ratings as stars. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1ee870d67c
commit
c1f9be2eef
14 files changed
+400
-31
No files matched your search
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* A scale rating: the number, or stars with a text alternative for screen readers.
|
||||
*
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Slide $slide Scale slide
|
||||
* @var int $value Rating
|
||||
*/
|
||||
if (!$slide->isStarRating()) {
|
||||
echo (int)$value;
|
||||
|
||||
return;
|
||||
}
|
||||
?><span class="rating-stars" aria-hidden="true"><?= h($slide->ratingText((int)$value)) ?></span><span class="sr-only"><?= __('{0} von {1} Sternen', (int)$value, (int)$slide->setting('scale_max')) ?></span>
|
||||
Reference in new issue
Block a user