Add optional comment field to multiple choice slides
CI / Deploy / PHP 8.4 (push) Successful in 1m11s
CI / Deploy / PHP 8.5 (push) Successful in 1m11s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Participants can justify their choice; the comment is stored once in the
first response row, rotates on the stage like scale comments and is listed
in the admin area and the PDF export.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-13 09:29:25 +01:00
1 parent 28bfd535f4
commit 61718ed7c6
14 files changed
+330 -29

No files matched your search

+5 -1
View File
@@ -610,7 +610,7 @@
choice: function (results) {
var max = Math.max.apply(null, results.options.map(function (o) { return o.count; }).concat([1]));
return el('div', { class: 'bars' }, results.options.map(function (option, index) {
var bars = el('div', { class: 'bars' }, results.options.map(function (option, index) {
return el('div', { class: 'bar bar--c' + (index % 6) }, [
el('div', { class: 'bar__label', text: option.label }),
el('div', { class: 'bar__track' }, [
@@ -619,6 +619,10 @@
el('div', { class: 'bar__value', text: formatNumber(option.percent) + ' % (' + option.count + ')' })
]);
}));
if (!results.comments || !results.comments.length) {
return bars;
}
return el('div', { class: 'choice-results' }, [bars, Comments.render(results.comments, String)]);
},
/**