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
@@ -150,7 +150,10 @@ class SlidesTable extends Table
|
||||
$settings['private'] = filter_var($input['private'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
break;
|
||||
case Slide::TYPE_SCALE:
|
||||
$min = max(0, min(1, (int)($input['scale_min'] ?? 1)));
|
||||
$stars = ($input['style'] ?? null) === Slide::SCALE_STARS;
|
||||
$settings['style'] = $stars ? Slide::SCALE_STARS : Slide::SCALE_NUMBERS;
|
||||
// Stars always start at one star (zero stars is no rating).
|
||||
$min = $stars ? 1 : max(0, min(1, (int)($input['scale_min'] ?? 1)));
|
||||
$max = max(2, min(10, (int)($input['scale_max'] ?? 5)));
|
||||
$settings['scale_min'] = $min;
|
||||
$settings['scale_max'] = $max;
|
||||
|
||||
Reference in new issue
Block a user