Adding up responses to checked boxes

May 06, 2013

I have a series of five slides I am building.  Each slide will ask five questions.  The purpose is for the student to check each box that applies to their company.  I want to attribute a score of 10 points for each box checked.  I have my slide built for the choices and boxes, (I used the survey, pick many template).  Now I just need to insert a score box at the bottom when they hit submit to show their score.  At the end of the five slides I need to show a results (re-cap) of how they scored in all five areas.  What is my best way to do this?

Thanks for your help.

7 Replies
Kevin Thorn

Hey John,

There's a way to do this with variable programming. First question though is if your project needs to report each of those 5 questions per slide and total score to an LMS. If so, you may be out of luck based on the current Storyline output to SCORM and limitations on editing the results variables.

To set this up, the first thing I'd suggest is map out ALL your checkboxes and give them unique names in the Timeline. As I'm writing there's a couple ways to approach this. One way is to create a number variable for each checkbox with a default value of 0. Name them accordingly to their Timeline name (keep things organized). i.e. Q1check1, Q1check2, Q1chekc3, etc.

Set a trigger to each checkbox next > Adjust Variable [Q1check1] =Assignment [10] When checkbox "Q1check1" is Selected.

You'll have to think through evaluating if students click more than one checkbox on a slide. To do this, create a Button Set for all checkboxes on the scrreen - only one can be selected at a time. If you use Radio Buttons they are by default part of a Button Set. Checkboxes are not as they're designed for multiple selection (more than one choice), but can still be grouped into a Button Sets.

The challenge is if a student changes their mind and makes a different selection. If so, the first choice has already been assigned 10 points so you'll have to account for dumping the other variables back to zero. Meaning set five triggers for each checkbox when selected. One for setting the variable to 10 points and 4 for ensuring the others are set to their default value of 0.

Create one final variable for the total score. Each time a student clicks the Next button to go to the next slide (question) +ADD the current slide's selected variable to the Total variable. Do this for every slide. You can show the score on each slide or just on the final results by adding a text box and flank the name of the Total variable with percent symbols - %Total%. That text box will read it as a variable and display its current value.

Hope that at least gets you moving in the right direction.

Kevin Thorn

Hey John,

Took your .story file and added a new scene to demonstrate a possible setup (attached). It gets complex due to evaluating each checkbox to see if it's "selected". If so, add 10 points. If not, don't add 10 points. Simple enough but if a user already checked the box and changed their mind, you have to re-evaluate.

It gets really messy when you start adding and subtracting against a single variable based on user choice. A solution I came up with is a user first checks their score that adds to that questions total. If they want to change their selections, they can reset the question (which resets the variables). Once they are satisfied with their choices and click the Next Question button, "that" question's score gets set to the overall total.

Also added a layer to show if there is not at least one selection.

It's not as scary as it looks. Just work through the triggers one at a time and you should be able to understand the logic.

Oh, and I left the individual checkbox variable "listeners" next to each checkbox just for testing to ensure they are working correctly. Just delete those when you're done.

Finally, to add another question slide just copy one of those slides and make a duplicate. Create a new set of variables for that question and adjust the triggers accordingly.

Others may have a more elegant solution, but hope this at least sparks some ideas. Use what you need or toss what you don't need.


This discussion is closed. You can start a new discussion or contact Articulate Support.