Quiz Template Question - multiple choice code

I have used a template from RCSDemos team’s quiz templates, but I cannot figure out what is the coding error on the last slide. It does not like the code on the multiple choice questions…can anyone help?

Thats because the input there is the choice and not a latex string.
To the best of my knoledge, there isn’t a source for the number of choice chosen, yet you need it for the choiceContent source, so you could write a condition:

cellContent(1,2): when n1.isSelected(1) n1.choiceContent(1) when n1.isSelected(2) n1.choiceContent(2) when n1.isSelected(3) n1.choiceContent(3) when n1.isSelected(4) n1.choiceContent(4) otherwise "Unanswered"

cellContent(6,2): when n6.isSelected(1) n6.choiceContent(1) when n6.isSelected(2) n6.choiceContent(2) when n6.isSelected(3) n6.choiceContent(3) when n6.isSelected(4) n6.choiceContent(4) when n6.isSelected(5) n6.choiceContent(6) otherwise "Unanswered"

Not very elegant but it works. Good luck!

Side note: if you’re not interested in seeing the entire choice in the table, but still want to know which coice was chosen, you can write:

cellContent(1,2): when n1.isSelected(1) "A" when n1.isSelected(2) "B" when n1.isSelected(3) "C" when n1.isSelected(4) "D" otherwise "Unanswered"

cellContent(6,2): when n6.isSelected(1) "A" when n6.isSelected(2) "B" when n6.isSelected(3) "C" when n6.isSelected(4) "D" when n6.isSelected(5) "E" otherwise "Unanswered"

Thank you! This is great help.

I ended up using a different template so that all questions weren’t on one slide, for this quiz.

Can you help with the code on the very last slide? There are two errors and I can’t figure out what to do to fix them. Everything is all set except for those two. Thanks in advance!

In the last screen, go into the graph code and change:

numberList("i_{vars}"): aggregate(n10.script.correct)


numberList("i_{abc}"): aggregate(n10.script.correct)

By the way, the computer told you what was the problem: when you put the mouse on the warning sign it reads “can’t find variable i_abc (needed for x_10) in graph sum”. It means you should go to the graph you named sum and check why the variable i_abc isn’t defined.

Thank you so much! Very much a CL newbie. Trying to learn by copying others’ code and experimenting. Appreciate the help!