Forum Discussion

StevenCroft-edb's avatar
StevenCroft-edb
Community Member
4 years ago

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.

  • Variables should resume if inside an LMS.

    However for a variable value to save you must change slides before exiting.

  • 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.

  • MarkLentz's avatar
    MarkLentz
    Community 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"!

     

    • PhilMayor's avatar
      PhilMayor
      Super 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

  • Is there an option to enable 'bookmarking' ( thus saving variables states ) when published as HTML5 and not for LMS ?

  • richardattia's avatar
    richardattia
    Community Member

    Hi Phil.

    Has there been any update on saving variables value without exiting to the next slide?

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      No it still needs a jump to another slide or showing a light box to save

      Sent from my iPhone

  • Good workaround might be a lightbox quickly showing and hiding. Gonna test that when i have some spare time.

  • @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-9's avatar
      MathNotermans-9
      Community 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...

  • 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.)