Hello!
I'm trying to set up a survey to be used for employees to take as an online test. The test consists of multiple select_one/select_multiple questions and each question has one or more right answers. I would like to assign the right answers a score of 1 and tally the results using a hidden score field to know if the users passed or not. What would be the best way to go about accomplishing this?
Thanks!
Solved! Go to Solution.
Typically for this you have a corresponding calculate type row for each question. This field does something like if(${field1} = "Correct answer", 1, 0)
For select multiple you need to use selected and then an or if there is more than one correct answer if(selected(${field1}, "Correct answer") or selected(${field1}, "Correct answer 2"), 1, 0)
At the very end you can add them all up. ${Check1} + ${Check 2} ...
Make sure to set the bind type field to int on the checks so that your final answer does an add and not a concat.
Hope that helps
Typically for this you have a corresponding calculate type row for each question. This field does something like if(${field1} = "Correct answer", 1, 0)
For select multiple you need to use selected and then an or if there is more than one correct answer if(selected(${field1}, "Correct answer") or selected(${field1}, "Correct answer 2"), 1, 0)
At the very end you can add them all up. ${Check1} + ${Check 2} ...
Make sure to set the bind type field to int on the checks so that your final answer does an add and not a concat.
Hope that helps
perfect! Thanks @DougBrowning
Hey @DougBrowning ,
Do you have a method for tallying up a select multiple with each selection having a point associated with it?
For example:
"Which Equals 4?"
A. 2+2
B. 1+3
C. 3+1
D. 5-1
I would like to assign each of these a point so the question total would equal 4 points. Currently the question is set up to be a single point for the entire question.
Thanks.
I think I know but you mean but not positive.
In your simple example all answers are correct so just count-selected(${previous_question}) would work.
But if you have to test each one then all I can think of off the top of my head is to have 4 fields.
if(selected(${field1}, "Correct answer"), 1, 0)
if(selected(${field1}, "Correct answer 2"), 1, 0)
etc. Then add those 4 fields up. Of course this can get really long depending on the list.
Hope that helps.
Hey @DougBrowning worked exactly as I needed. Thanks again for the help!
Is this really the easiest solution for tallying the results of a quiz? Is there an easier way to simply mark an option as 'correct' and quickly view the results at the end. I'm trying to give a short multiple choice quiz, but perhaps Survey 123 isn't the best option.