Explore the community Forums Lectora Lectora Questions & Answers Proplem with variable :-) Reply To: Proplem with variable :-)

#418081 Score: 0
Profile photo of Tim K
Tim K
Member
contributor
beginner
intermediate
advanced
friend finder
junior moderator
advocate
wise owl
curious george
Group Member
355 pts
@timk

Does the quiz work for you? After import to Lectora 17 I’m not able to go through the quiz because several times (I don’t see a pattern) the submit button doesn’t hide the entire question group and I can’t continue. So I can’t reproduce the issue …

With regards to your issue: I can’t find an actual mistake but it may result from the sequence of the actions in your “Done” group. You calculate the percent score when the image “TextBox_Intro” is shown. You use the result to run those action groups when the textfield “Percent” is shown. As it usually takes shorter to show a textfield than an image and it takes a (short) while to execute the calculations it may just be that the action groups are run too early.

The variable “29864_percent” isn’t used before the image is shown, so when the “Run action group” action fires its value may be “~~~empty~~~” which (of course) is neither less than nor greater than 80, so both actions to hide either “done_PassText” or  “done_FailedText” aren’t run due to their conditions … which is technically correct.

To get to the point:

Move the action to run the groups from the textfield to the image. Make it the last action, to be sure the value of the variable is calculated before the action groups that require this value are run.

… but I couldn’t test whether or not this solves it.