Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

LMS Time Out Message

Community Beginner ,
Dec 01, 2017 Dec 01, 2017

I have a problem with the LMS timing out before a user has completed their course:

Say a user starts a course and is interrupted, for whatever reason, and does not get back to their course to finish it until some time later.
The amount of time that has elapsed is enough for the session to time out on the LMS, but the user is unaware of this.
So, they continue with the course until it is complete.

At this point the user thinks they have completed the required course (which they actually have), but it is still not marked as complete in the LMS.
Is there a way to notify the user that the LMS has timed out and that they should restart the course (to continue where it left off/timed out)?

I have created a clunky mechanism by which each slide has X minutes until it times out and a message appears to prompt the user to close the browser and restart the course.

In Articulate Storyline there is a line in one of the HTML files that can be modified to turn on a popup error message once the session/connection has been interrupted.
Is there something similar in Captivate?

Thanks!

1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 07, 2017 Dec 07, 2017

I've been half watching this hoping for a better reply, but you've been left hanging so I'll try.

1. The timeout is a function of the LMS. Some LMS products have a hard limit. Some keep the session alive as long as the training is open. If they have a hard limit, the LMS should alert that the session is about to time out (like banking online, for example). So you may want to make a suggestion to the LMS vendor to avoid this behavior.

2. The LMS should NOT timeout the lesson if there is activity detected. If it is timing out because it's a long course and there's no activity recorded until the end, you may be able to avoid that by ensuring the 'SendTrackingDataAtEnd' template in the scorm settings is not selected. Using the default template *should* send resume data back to the LMS every page or so...as long as you do not have 'Never Send Resume Data' selected elsewhere in that SCORM setting dialog.

3. You can try to force data to be sent by creating a scored quiz item every couple pages, so the user has to answer and interaction data is then sent back to the LMS...again, as long as the 'SendTrackingDataAtEnd' template is not selected.

4. Otherwise, you need a custom option. There's nothing in CP that I'm aware of that is like the Storyline option you mention. However, if you examine the JS code (I forget the name of the file, but look for a .js file in the published output), you may be able to track down where it sends commands to the LMS. It's been too long since I've worked with that to give you good guidance, but someone with solid javascript knowledge should be able to decipher that and construct a JS function you can call via Advanced Actions...so every couple pages, invoke that Advanced Action and call the JS function...which can do something basic like ask the LMS for the learner's username.

Hope that helps!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 19, 2017 Dec 19, 2017

I solved this by using JavaScript to create a popup window notifying the user that they had been locked out. It then disables the navigation buttons, forcing the user to close the window.

The script is here if anyone is curious:

countdown = setTimeout(timeOut, 10000)

function timeOut () {

alert('You can restart this course at any time and you can choose to resume where you <br> left off. You will continue to receive reminders until the course is complete and <br> you have certified your acknowledgment.', 'Your session has timed out. Please close this browser window');

cp.disable("Button_1");

}

You have to also reset the timer when a navigation button is pressed, that way the timer is reset, or else it carries on to the next slide (this case it is set to 10000ms (10 seconds)) The code for the reset is:

clearTimeout(countdown);

cp.goToNextSlide();

(or cp.goToPreviousSlide(); for the previous button)

Hope this helps if someone else runs into a similar circumstance!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 19, 2017 Dec 19, 2017

I like your solution here - thanks for posting it. 

If you want to force the user to close the window you could also use

close();

rather than disabling the navigation buttons.  If you want to give them a warning before the window closes, use 'confirm' instead of alert. This will break the javascript until the user hits the ok or cancel button. I think Captivate has its own built in 'alert' function but it does break the js.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 19, 2017 Dec 19, 2017

Awesome- good to know!

Do you know if there is a list of Captivate specific JavaScript functions and how to call them?

I haven't found a very comprehensive list!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 19, 2017 Dec 19, 2017

There this which is resource specific to Captivate functions. They're created in the CPM.js file.  

https://helpx.adobe.com/captivate/using/common-js-interface.html

There is also things like:

cp.enable('Object')

cp.hide('Object')

But 'regular' javascript interacts with Captivate pretty much the same as any other program.  You can set variables, create functions, interact with objects on the screen, or whatever you really need.  I've pretty much moved away from advanced actions because I found it easier to program them in in js.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 19, 2017 Dec 19, 2017

I've been trying to close the window now after the alert. The close() function does not work to close the window (there are a bunch of posts already about this), so I have been using DoCPExit() which seems to work.

My understanding of alert is that the code that follows it should be executed upon click of the OK button.

Is this correct?

I can't seem to get that to work, the whole script seems to be running, instead of finishing after the OK button press.

This for example, flashes the message and closes the window promptly:

alert('message');

DoCPExit();

Is there a way to have DoCPExit() run after the OK button has been pressed?

Thanks for all your help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 19, 2017 Dec 19, 2017
LATEST

The 'alert' function when used in Captivate does not seem to break the code.  I think Captivate claims the function in their coding. 

Instead try using confirm('message') instead.  That's breaks the code until the user hits either cancel or ok. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources