How do I retain the variables of a page when returned?
March 19, 2014 12:00 AM
PLEASE HELP!
How can I set the variables of a page which requires an action be carried out on the page before you can advance the screen the first time, but enable the next button when the page is revisited.
I am programming a course where the user needt to click on a photo before they can advance to the next page.
When the user reaches the end of the course they can revisit the pages, however, current functionality resets the photo and disabled Next button...so the user has to go through the activities all over again.
How can I retain the result of the clicked image and allow the user to move freely through the course after they have completed it once?
Discussion (1)
1. Create a variable, e.g. "img_clicked"
initial value: 0
Check "retain value between sessions" if you want to remember the click even if the user closes the module to continue later.
2. Add an action to the image
On: Click
Action: Modify variable
Target: img_clicked
Type: Set
Value: 1
3. Add an action to the page
On: Show
Action: Show
Target: Next button
Condition;
Only if img_clicked equal to 1
Tim
Discussions have been disabled for this post