Skip to main content
teresah9791625
Known Participant
January 17, 2017
Question

Issue with spaces in suspend data

  • January 17, 2017
  • 1 reply
  • 467 views

I am  using captivate 9 to publish a html 5 scorm2004 course. I have a variable thats value is a space. When I run the course in scorm cloud and exit before complete, then when I return that variable value displays as zero. Does anyone know why this is happening and what I can do about it?

 

Thanks

    This topic has been closed for replies.

    1 reply

    Inspiring
    January 17, 2017

    I had a similar problem. I solved it as follows:

    My variable was named "i" and its value was an empty space. Sometimes (when executing a JavaScript) the value changed to 1 (for some strange reason).

    Then I just changed the name of the variable. The new name was "t" instead of "i" - and I never had this problem again! So just try a different name for the variable (maybe "t" works for you too...).

    Try again whether it works! Good luck!

    TLCMediaDesign
    Inspiring
    January 17, 2017

    That's most likely because Captivate needs to loop through all of the suspend data string to repopulate variables and "I" is the variable used in the loop. Also the space character could be encoded as %20 and CP had a hard time parsing it back into your variable.

    Bottom line, a variable with a single character used in someone else's code is not a good idea. And a space for a value is not a good idea either.

    Inspiring
    January 18, 2017

    Thanks, your right - I think this is the reason!

    To be precise, I did not really use a "space" as value for the variable but my variable was just "empty" (without any value). I used it to prevent Captivate from converting texts into pixel graphics. I think this is a standard use for variables without value. But naming the variable "i" was surely a mistake.

    So thanks again for the explanation!