Forum Discussion
Saving variables for re-launch
Hello, I can't believe I haven't come across this before, but it seems variables get set to their default state on a course re-launch. Is that expected?
I've tried variables and according to an object's state, and also made sure the slide is set to return to saved state, not initial. But no luck.
It would be handy to have all variables as they were when the learner was last in the course so they can continue how they left off.
Does anyone have any ingenious ways of making sure this happens? Thanks.
- PhilMayorSuper Hero
Variables should resume if inside an LMS.
However for a variable value to save you must change slides before exiting.
- StevenCroft-edbCommunity Member
Thanks Phil,
I've only tested on ScormCloud so far but that should be acting reliably?
Yes that's probably the issue then - and why I haven't noticed it before - learners sometimes exit on the page on which the variable is set, so when returning to that same page, its reset to default values. - MarkLentzCommunity Member
Is it possible that using Javascript for something like this command would save all variables when it is run?
LMSCommit( “” ) : bool – Indicates to the LMS that all data should be persisted (not required)
As an aside, I did not initially realize that if you set the Resume feature to "Prompt User" and the user chooses "Restart", that flushes all their variables. So I set it to "Always Resume"!
- PhilMayorSuper Hero
Variable values are saved in the bookmarking data which is updated when you jump slides. I would suspect if LMS commit causes the bookmark to be refreshed it will only send the bookmark for the previous slide.
Sent from my iPhone
- MathNotermans-9Community Member
Is there an option to enable 'bookmarking' ( thus saving variables states ) when published as HTML5 and not for LMS ?
- PhilMayorSuper Hero
Since the demise of flash, resume outside of an LMS can be flakey.
Sent from my iPhone
- MathNotermans-9Community Member
Ok thx Phil...
- richardattiaCommunity Member
Hi Phil.
Has there been any update on saving variables value without exiting to the next slide?
- PhilMayorSuper Hero
No it still needs a jump to another slide or showing a light box to save
Sent from my iPhone
- MathNotermans-9Community Member
Good workaround might be a lightbox quickly showing and hiding. Gonna test that when i have some spare time.
- PhilMayorSuper Hero
@MAth I am sure you know this better than me, there have been plenty of codes shared to hide to make all aspects of slide transparent on a Lightbox so the user may never know it happened.
- MathNotermans-9Community Member
Indeed ;-) but the simple fact that a lightbox is nothing more then a separate slide in Storyline...well eluded me for a while ;-) So having a invisible lightbox triggered might be a solution i guess... your variables then get saved to the bookmarking data...
- DouglasHarri142Community Member
Is there a difference between Project variables and Built-in variables in this regard?
I've been testing the Slide.ElapsedTime and Project.ElapsedTime variables in our LMS and am finding that they reset when I exit the course, re-open it and resume.
(Project variable values have persisted with this tests, returning to their value at the point of the most recent Next button usage, and have not reset.)