Problems Figuring Percentage Score

Apr 26, 2013

Hello! I've created a freeform, 10 question quiz with radio buttons.  I want the "Correct" and "Incorrect" layers to display the user's percentage correct (results.ScorePercent).  This is a built-in variable when a results slide is added.  However, I don't want to display a results slide.  On top of that, I'm not sure how to get the user's responses to the radio buttons to factor into the percentage.  I'm guessing, I need to use some sort of number variable and if that is the case, I really won't need to use the results.ScorePercent variable at all.  It would just be the display of the number variable. 

I understand this conceptually, but don't know how to put it into practial terms. 

As a side note, I am trying to display layers from hotspots on the "Correct" and "Incorrect" layers. This isn't working, but as I type this, I think I could accomplish the effect I'm going for with states (typing out your problem can be theraputic sometimes...).

Find a sample file attached.  Thanks, community!

4 Replies
Josh Uhlig


I think part of the problem with how you set things up is that you are trying to treat each option as a separate question, when in reality, the entire slide is one question.  So you only have two options, 0% and 100%.  You get 0% if even only one of the items is incorrect.

So basically, you need a variable to count how many correct radio buttons were selected, and then divide that count by 10 to get your percentage (of course mulitply that by 100 before dispalying).  There are several ways to accomplish this.  I'll try messing around with it later to give an example.

Josh Uhlig

Ok, I've attached what I came up with.  And here is an attempt to explain what I've done:

  1. I added a button set to each pair of raio buttons.  This is done by selecting both items then right click, and choose Button Set (where you can create a new button set for each pair).  This keeps a user from selecting both options
  2. I added 10 true/false variables with an intial value of false, one for each radio button set. 
  3. I added triggers to all the correct radio buttons to change the variable above to true when selected, and another set of triggers to each incorrect radio button that changes the variable to false. This allows the users to change the answer as many times as they want without affecting the result.
  4. I added a count variable initially set to 0, and then 10 triggers to the submit button (triggered when it is clicked), one for each of the true/false variables.  Each adds one to the count variable if that variable is equal to true.  This result in a count of how many are correct when they click the submit button.
  5. Finally I added a percent variable (actually I think I used the one you already had in there), and I added triggers to the submit button (triggered when clicked) so it first changes the Percent variable to equal the count variable, then another trigger divides Percent by ten, and a final trigger multiplies Percent by 100.  It is important that these last 3 triggers happen in that order and are the last 3 triggers based on clicking the submit button (after all the +1 to count triggers).
  6. I also displayed some of the variables so I could see what was going on as I was creating things.  They can be removed, of course.

I think that is everything.  I would also recommend removing the free form interaction, and just copying the Incorrrect Layer and renaming it "Feedback" as there is no need for a Correct and Incorrect layer.  The incorrect layer has everything you need, and the free form isn't really needed since you want a score based off of each set of radio buttons rather than the full set.

There is, of course, the possibility that there is a much easier way and I'm making things way more difficult than they need to be..!??!  Happy Friday!

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