Coding a % on results slide
Jun 15, 2014
Hi
I have created a set of 52 slides where learners will view a word to see if they remember its definition, then click a button that shows another layer on that slide with the correct definition. They then self-assess if they got it right by clicking on an “I got it” button, which I have adding a value of “1” to a custom numerical variable I created. I wanted to show the slides in random order, which I am able to do with a question bank.
BUT the idea is, on the results slide, I want to show a percentage of how many they said they got correct. How do I take the value of that variable I created (which could be anywhere from 0 to 52) and display it as a % of 52 onscreen?
I did briefly consider converting all 52 slides to “pick one’ s” I could use the SL default results slide, but I can’t do that easily since the correct button is not on the main layer. And of course I am trying to avoid redesigning all 50 slides!
Thanks in advance for your help!
7 Replies
Hey Gordon,
Take a look at the attached file. The calculations are run on the master slide. It calculates whenever the total answered questions changes. By dividing the total by 100000 then multiplying by 10000000, the value rounds to a whole number.
Wow Steve! Let me take a look at this and see if I can make t work for me.
Hey Steve,
Not sure what I did wrong but it did not work. I used your variable names so I could keep track easily. I replaced my current add 1 to my flashcards variable with the one you used on your add 1 button on all 52 of my slides. I added the calculations to the slide master used on all my flashcards slides, as well as on the master for the layout I use on my results slide. I then added the references for total answered and % answered to the success and failure layers of my results slide. Wile total answered displayed accurately (I answered 46 of 50 correctly so it showed 46 as it should), the percent answered (which I assume was supposed to show % correct) displayed as 0%.
I have attached the story file for your perusal, and I thank you in advance for your help!
Hey Gordon,
Didn't see any questions in the pool of the attached example. Jumps right to the results slide. The problem could be the duplicate variable. There is one named perecentAnswered and another named percentAnswered. I see that perecentAnswered is referenced in the slide master that contains triggers. There is one trigger on the results slide that references percentAnswered, another references perecentAnswered.
Weird that the pool did not come over in the story file. I will check the multiple % answered and see if that's the issue.
Yippee! It seems to work now. One more question if I may Steve... I am giving learners the option to retake the test. Should I add a trigger on the exercise intro slide that resets percentAnswered to zero? Or resets the other variable? Or Both?
Thanks!
Hey Gordon! Good to hear. Yes, I'd reset totalAnswered to zero when they choose retake. percentAnswered is calculated from totalAnswered.
This discussion is closed. You can start a new discussion or contact Articulate Support.