Skip to main content
Inspiring
July 28, 2017
Answered

Storing variables in LMS after the user resumes the module

  • July 28, 2017
  • 2 replies
  • 2223 views

Hi there, I have been looking into a solution for my issues and have found a really good thread about storing comments. https://forums.adobe.com/message/7020917#7020917

However, what I am trying to get is different. I will make the example really simple.

I have two menu items, there are two ticks. The ticks against the two menu items are hidden by default. They appear once a variable is set from 0 to 1. In other words, the first tick would appear once the user has gone to the last slide of the first topic. On the last slide, the variable would change from 0 to 1 and the tick would appear.

The settings on the LMS are set so the user could take only the first topic and when s/he resumes the module, s/he would resume from the place where s/he left (bookmarking is active). So far, so good. The issue is that when the user resumes, the variable is reset to 0 and the tick image would not appear.

Would you have any idea about how I could tackle that please?

The LMS is LMS365 - Sharepoint.

Thank you so much in advance.

Bobby

PS. Can I store the variables in cmi.suspend_data?

Actually, I am not sure where is cmi.suspend_data stored when the users closes the module half-way through it? Is it on the LMS?

This topic has been closed for replies.
Correct answer papaintegrator

Hi Boby,

You can use a JavaScript in the starting of the course and retrieve the cmi.suspended_data from the LMS to parse it:

function SCORM_GetDataChunk() {

    WriteToDebug(

        "In SCORM_GetDataChunk");

    SCORM_ClearErrorInfo();

    return SCORM_CallLMSGetValue(

        "cmi.suspend_data");

}

OR

function SCORM2004_GetDataChunk() {

    WriteToDebug(

        "In SCORM2004_GetDataChunk"

    );

    SCORM2004_ClearErrorInfo();

    return SCORM2004_CallGetValue(

        "cmi.suspend_data");

}

/Best

2 replies

papaintegrator
papaintegratorCorrect answer
Inspiring
August 8, 2017

Hi Boby,

You can use a JavaScript in the starting of the course and retrieve the cmi.suspended_data from the LMS to parse it:

function SCORM_GetDataChunk() {

    WriteToDebug(

        "In SCORM_GetDataChunk");

    SCORM_ClearErrorInfo();

    return SCORM_CallLMSGetValue(

        "cmi.suspend_data");

}

OR

function SCORM2004_GetDataChunk() {

    WriteToDebug(

        "In SCORM2004_GetDataChunk"

    );

    SCORM2004_ClearErrorInfo();

    return SCORM2004_CallGetValue(

        "cmi.suspend_data");

}

/Best

Inspiring
August 28, 2017

Is this code specific to Sharepoint LMS, or is it standard across all LMS??

Inspiring
August 30, 2017

Right, as I have mentioned already- 'You can use a JavaScript in the starting of the course and retrieve the cmi.suspended_data from the LMS to parse it', once you have the data, you'd need to parse it to your requirements.

I guess, if you are here looking for cmi.suspended_data, you know what to do next with it or else you'd not look for it in the first place.

Let me know if there still is any confusion along the workflow.

/best


Hi papaintegrator,

Indeed, as Rod said, I am not a JS person. Would you please indicate how to parse the info?

Thank you once again

B

Lilybiri
Brainiac
July 28, 2017

Which kind of output: SWF or HTML5? You probably will need to use local storage to store and retrieve the values of the variables.

Inspiring
July 30, 2017

Hi Lieve, thank you for taking time and replying. The export will be in both SWF and HTML5. Would you please point me to a place where I could find more information on how a local storage would work in a LMS?

Thank you

B

Lilybiri
Brainiac
July 30, 2017

I hope you don't use both publishing to HTML5 and SWF at the same time, because since CP9 I had a lot of problems. Moreover since EOL (end of life) has been announced by Adobe for Flash player (which will make courses in SWF output unacessible) within a couple of years I would recommend to focus only on HTML5 output at this moment. The JS integration, which you need to use local storage is also a lot better than with SWF output although there is a common JS API in Captivate:

Learn about the Common JavaScript interface for Adobe Captivate

If you use only HTML5 output, and don't want to learn JS, I also can recommend the CpExtra widget by InfoSemantics (will not work for SWF output). Onne of its multple features is to use local (or session) storage to transfer values of variables between courses.

Introduction to CpExtra | Infosemantics Pty Ltd