Retaining a variable’s value between sessions.
Jun 20, 2013
Hello all!
I have created a True/False variable. I have set its initial value to “False”. When a user clicks on a button, the variable’s value changes to “True”.
Here is my problem: When a user exits my course, and later on decides to log back into the course, the variable’s value resets to “False”.
Does anyone know how to ensure that the value of the variable is retained BETWEEN sessions?
I.e.: how can I ensure that once the variable has changed from ‘False’ to ‘True’, it remains ‘True’ all the time (even between different sessions).
?
5 Replies
Hi Alex!
The variable should be retaining it's value across sessions if the user is re-accessing the course from the same computer and cookies are turned on. If the computer is in an office it's possible that the cookies are automatically re-set nightly and perhaps this is why the variable isn't retaining it's value.
Does the course bookmark prompt appear when you re-launch the course? (The prompt that asks you if you'd like to Resume where you left off).
Hi Nicole!
Yes it does, and resuming where a user 'left off' solves the issue.
Thanks for your help!
Perfect!
Happy to help, Alex
Can we keep value of variable when user select no on re-launch the course?
Hi Nitesh,
Not within the course - the value of the variable will be reset if they selected not to resume. You may want to look at sending the value of a variable to your LMS.
This discussion is closed. You can start a new discussion or contact Articulate Support.