Variables resetting upon button click
Dec 05, 2013
By
Andy Lade
Hi there,
I have produced a slide with a custom interaction using variables to track when a learner has chosen the correct options from 11 decisions. Each variable increases by 1 and a total variable tracks the overall score against the number of selections which have been made.
When learners click submit then I have a results dialogue box which shows the number of selections the learner has got right against the number they have selected.
All of these functions are working fine until the learner clicks on the custom submit button on the page because for some reason it is wiping all of the variables which are on the page, this is leading to the dialogue box always stating that the user has got 0 out of 11.
Any ideas?
Regards,
Andy
3 Replies
Hi Andy, I have a couple of questions.
First, can you tell me why you have a submit button on the results page? what is the expected behaviour when the user clicks the button? Also, can you tell me if there is a trigger on the submit button. If yes, can you describe what action it triggers?
Hi Nancy,
Apologies for the confusion, there isn't a results slide, it's all contained within the same layer of the same slide.
The results box is hidden in it's original state, it has a correct and incorrect state which include different wording and also reference the variables to communicate the score. The submit button changes the state of the hidden box to correct if all have been answered correctly (condition on the trigger to check the variable) and vice versa for the incorrect wording.
So the trigger behaves in the way that it changes the state of the box to correct (if variable = 11) or change state of box to incorrect (if variable doesn't = 11).
I hope that gives a little more clarity of what is happening on the slide.
Regards,
Andy
Ok, the only part that is still not clear to me is "and also reference the variables to communicate the score" . Is there any way you can attached the story file or the quiz part of the file so I can see your logic?
This discussion is closed. You can start a new discussion or contact Articulate Support.