Add optional comment field to multiple choice slides
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:
1 parent
28bfd535f4
commit
61718ed7c6
14 files changed
+330
-29
No files matched your search
@@ -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)]);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user