I was trying to make a note whose content is dependent upon which choice a student chose from a multiple choice, but I get the error that choiceContent’s parameter must be a constant. Is there a workaround that doesn’t require making a separate “when” statement for each isSelected() choice?
n=
when qq5b.isSelected(1) 1
when qq5b.isSelected(2) 2
when qq5b.isSelected(3) 3
when qq5b.isSelected(4) 4
otherwise 0
content:
when qq5b.matchesKey "Great job! The pattern is ${qq5b.choiceContent(4)} ✅"
when qq5b.isSelected(1) or qq5b.isSelected(2) or qq5b.isSelected(3) "Try again. The pattern is not ${qq5b.choiceContent(n)} ❌"
otherwise "So, the pattern is `y=`"