Forum Discussion

valerieshaw's avatar
valerieshaw
Community Member
3 hours ago

Advice wanted--How to make a text entry populate from existing trigger?

I've created a simple interaction whereby a user can "create change" with different bills and coins to add up to a predetermined amount. What I would like is to turn it into a math equation of sorts, and have the user practice calculating the correct amount needed for change, than submitting after they've added up bills and coins correctly.

example: Your customer's total comes to $28.50. They hand you $40. Use the bills and coins in the register to calculate the total change that you owe to the customer, then click "submit".

In a nutshell, I'm wonder if there is a trigger that either allow the total in the blue box to be submitted, or, if the text entry from the freeform quiz can be auto-populated with the amount displayed in the blue box, so that the user doesn't have to add up the change and type the total into the quiz text entry box.

 

I'll attach an example for reference:

https://360.articulate.com/review/content/e06dbe7d-b253-4613-8211-db3c37c34464/review 

  • HoneyTurner's avatar
    HoneyTurner
    Community Member

    Each time your user total changes, I would have it trigger a check to see if it's correct.

    If it is, set an offscreen object to "selected". If it's incorrect, set the offscreen object to "normal".

    e.g. if vChange is a variable containing the current amount of change and cChange is a constant programmed with the required amount:

    When vChange changes, if vChange = variable cChange change state of Answer to Selected, else change state of Answer to normal

    Set your quiz as multiple choice and have the correct answer be the offscreen object "Answer". So when you submit, it's only checking to see if the offscreen object has been selected.

  • I just looked at the other quiz options. It looks like you could also Numeric graded question by assigning the calculated total to variable NumericEntry