Using checkboxes and variables ....

Jul 27, 2012

There may be an easier way of doing this which I haven't spotted but .......

Background:

I am creating a 'risk assessment' as part of a learning module using Storyline.  The assessment has a series of questions which the learner needs to answer so that at the end of the assessment, rather than having passed or failed, they have an indication as to whether their combined choices represent high or low risk.  If it's high risk, they branch in one direction, if it's low risk ... etc, etc.

There are 3 possible choices learners can select from for each question asked - 'yes', 'no', 'don't know'.  Since it is not the case that all questions answered 'yes' are necessarily associated with high risk and conversely not all 'no' answers are necessarily associated with low risk, I dismissed the use of any of the quiz templates or freeform questions. 

What I've done:

Each question is listed down the screen.  To the right of each question are three checkboxes, one in each of the columns representing 'yes', 'no' and 'don't know'.  I've set up one variable, RiskSum.  RiskSum increases or decreases according to triggers applied to each checkbox, eg answering 'Yes' to question 1 increases RiskSum by 3, though answering 'Yes' to question 2 might decrease RiskSum by '2', etc, etc.  This means that my scoring fully works the way I want it to and fully represents the real-life risk profile.  I then have two final triggers - 'Next' sends learners down the 'high risk' route if they score above my predefined threshold, or down the 'low risk route' if they score below that threshold.  All this works perfectly ..... however ....

My challenge

There is a risk that a learner might first check 'Yes' in response to a question, then check 'No' after some reflection.  This action means there are two check marks on the screen and the learner has to remove one, but much more importantly, this secondary choice effects the RiskSum count!  Is there some way I can restrict learners to being only able to select one checkbox answer per question ...... (I'm happy to live with 'once checked it can't be unchecked as long as the RiskSum count isn't distorted) ...... or as I said at the start, is there a much simpler way of achieving this ......???

Many thanks!!!

14 Replies
G Dian

That's a really good question .... to which the answer is not necessarily, which is, I think what makes this the challenge!  For example, a 'yes' to question 3  might imply a far grreater risk than a 'yes' to question 2, but a 'no' to question 1 might not completely remove risk, (ie reduce the count by 3).  In some cases, answering 'no' is what presents the risk, and in others, answering 'don't know' might present just as high, if not a higher risk (on the basis that not knowing is worse than knowing).  Changing the construct of the questions themselves is a possibility of course, but the questions are then being framed to accommodate restrictions in scoring rather than to measure risk and there is the danger that the questions become less meaningful (and more torutred) in the process ....!!!

Phil Mayor

I would build this in excel so you get the correct weighting, or work it out on paper, then it would be simple to create your question and use a variable for each anser setting the score based on the selected state (use button sets0

Then add the score at the end and branch based on this score, I did this a couple of days ago took me 1.5 hours to do 20 questions with three possible answers

G Dian

Thanks, Phil.  I have the questions and scoring mechanisms sorted.  

I hadn't appreciated what the 'button sets' function offered, so thanks for that; it's really powerful and of course has resolved the problem of ensuring learners can select only one option for each question. 

I can't however, see how to resolve the problem that arises if a learner selects 'yes' for a question, then changes her / his mind to 'no'.  In this circumstance, both 'yes' and 'no' scores are added together for the same question, presumably because they have both been 'selected'.  If 'yes' for Q1 has a score of +3 and 'no' has a score of -1, I end up with a total of 2 which understates the risk  .....and of course, if the learner changes her / his mind on several questions, the score could become seriously distorted.  Is there some way I can 'reverse out' a score if a checkbox is subsquently unselected when the learner selects an alternative checkbox in the button set?

G Dian

Not sure whether I've understood the second part of what you've said, but what I've done seems to work!  I'd be really interested to know if what I've done is what you meant or whether through my misunderstanding, I've found an overly cluncky way of doing this!!

  • I now have a separate variable dedicated to each of the three checkboxes (1 each for 'Yes', 'No', and 'Don't know') for every question in the risk assessment, (ie 10 questions = 30 variables)
  • I have two triggers for each checkbox - 1 trigger sets the value to 1, 2, or 3, (or whatever the risk value) if the state is selected, and a 2nd trigger setting it to 0 if it is n ot selected.
  • An additional variable (Sum) adds up all values when user clicks next
  • Two final triggers send the learner down one branch or another depending on whether their total risk score is above or below my predefined threshold.

As far as the learner is concerned, the slide is simple, clean and clear ..... behind it, it's a bit mucky, but as I say it works!!!

Thanks for all your help!!!!!

Phil Mayor

Glad it works, I did it using one variable for each trigger Q1, Q2, Q3

I then set button sets for each question, on the Next button I set a trigger to set Q1 to value of 1 if high = seleceted etc.

This way the variables only get set on the next button and I dont have to worry about unsetting them.

I think both ways work well, they probably use similar numbers of triggers,

Phil

Phil Mayor

James, nice screenr, my solution was not much different, but went over 7 slides so I added them up on the final slide.  I just had my score set via the custom next button.

To add to the complexity I needed three questions to change the content based on choosing high for each of these (used a T/F variable for this)

Wish I could share but not able.  I also had to allow a manual override for people who did not want to complete online or use different weighting via a downloadable excel spreadsheet

Kevin Thorn

Just now getting around to this one. I've been smooching on my new granddaughter. And no, I'm not that old!

@G Dian, there's more than one way to approach this as Steve and Phil described above. My challenge that Mike mentioned was a multiple selection and multiple feedback interaction. The learner had the option of choosing one or all selections and based on those choices would display one of six results screens. LOTS of variables to evaluate every possible scenario.

First, the limitation with check boxes and variables is what you referred to once a learner clicks it adds to a variable. However, if they change their mind and click (uncheck) the box, it adds again to the same variable. Instead, the best way I think is what Phil suggested and work off the checkbox states. From there add to your variable based on the state you want to do the calculation. 

Again, echoing above you'll get the best control if  you assign a variable per choice. For instance RiskSumQ1, RiskSumQ2, etc. can be assigned per question group. Then ckboxQ1C1, ckboxQ1C2, etc. for the number of check boxes you have per question - C1, C2, etc. refers to 'choices.'

Example:  

Add+ 1 to RiskSumQ1 if ckboxQ1C1 = selected.

Add+ 2 to RiskSumQ1 if ckboxQ1C2 = selected.

Add+ 3 to RiskSumQ1 if ckboxQ1C3 = selected.

...

Finally, if you're wanting to prevent further selection by way of instructing learners they only get one chance to make a selection you can create a transparent 'shield.' Create a shape just big enough to cover each of the checkboxes and set their transparency to 100%. Set their initial state to Hidden. When a learner checks one of the boxes set a trigger to change the shape to normal - which covers the check box and prevents any further action. 

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