Add LMSCommit("") to prevent LMS timeout

gabriel
gabriel Community Member Posts: 9
Background:

Working with Lectora 9.

Our LMS times out if 30 minutes pass with no communication from the sco.

Lectora SCORM packages commit data only once, upon exiting the content.

Our users take longer than 30 minutes to complete content.

Breaking up our courses to decrease duration is not an option.



We are trying to get our vendor to increase the duration before timeout, but we will still experience the issue with some slow readers, as some of our courses are long (and will remain so), and our vendor will not increase the duration enough to resolve all of our timeout cases.



Request:

I need to know the syntax for adding LMSCommit to Lectora (probably every few pages or so) so that the sco communicates to the LMS to keep the session open.

Comments

  • sirwise23
    sirwise23 Community Member Posts: 442 ☆ Roadie ☆
    For Lectora 9 try an action that says



    GO TO WEB ADDRESS: javascript:LMSCommit();

    In current window
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    Ah, those lazy LMS vendros, I feel your pain.



    In Lectora 9 it should be "LMSCommit()" in JS, as simple as that. Although keeping a connection alive indefinitely is a security risk. You should instead kick the user out of your course as soon as the session expires unless they do something.
  • sirwise23
    sirwise23 Community Member Posts: 442 ☆ Roadie ☆
    ssneg,



    I agree with the security risk. This brings up a question for me. Is there a way to actually kick someone out if their session expired? Or maybe a way to kick someone out if a LMS commit fails?



    I have seen in some LMS's in the past where the connection is not happening but SCORM errors are not thrown either. What ends up happening is people complete the course, think they are done, but credit is never given because they had no connection.



    I would actually much rather the course just throws them out if it can't communicate.
  • kellykungfu
    kellykungfu Community Member Posts: 83
    @sirwise23 63154 wrote:
    ssneg,



    I agree with the security risk. This brings up a question for me. Is there a way to actually kick someone out if their session expired? Or maybe a way to kick someone out if a LMS commit fails?



    I have seen in some LMS's in the past where the connection is not happening but SCORM errors are not thrown either. What ends up happening is people complete the course, think they are done, but credit is never given because they had no connection.



    I would actually much rather the course just throws them out if it can't communicate.


    Lectora's JavaScript alert is suppose to display a popup to the learner if the API connection is broken. I've seen it a few times on a Saba LMS with SCORM 1.2. The courses that I have, on the pages before the 'very important ones', I have a few actions that will see if the student name or if the student ID is empty and if either are, then go to a "system outage page" and not to the "very important page". This way the learner will not go through the entire course, especially if the LMS is not tracking the progress/completion.



    -kelly
  • gabriel
    gabriel Community Member Posts: 9
    @ssneg 63151 wrote:
    Ah, those lazy LMS vendros, I feel your pain.



    In Lectora 9 it should be "LMSCommit()" in JS, as simple as that. Although keeping a connection alive indefinitely is a security risk. You should instead kick the user out of your course as soon as the session expires unless they do something.


    OK. I've seen that it can be done a couple of other ways:



    API.LMSCommit('');



    var result = LMSCommit('');



    So I can let the Javascript just run around naked without an event handler?
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    @sirwise23 63154 wrote:
    ssneg,



    I agree with the security risk. This brings up a question for me. Is there a way to actually kick someone out if their session expired? Or maybe a way to kick someone out if a LMS commit fails?



    I have seen in some LMS's in the past where the connection is not happening but SCORM errors are not thrown either. What ends up happening is people complete the course, think they are done, but credit is never given because they had no connection.



    I would actually much rather the course just throws them out if it can't communicate.


    I think it depends on the LMS. A smart LMS will kick you out when a session expires, some other will just expire quietly. Now what you can do is to:



    a) rely on LMS / Lectora communication to fail (Lectora will then show a "cannot communicate with LMS" warning). But it isn't bulletproof, because sometimes the LMS (or rather its SCORM player) will quietly accept SCORM communication and throw no errors despite lost connection. And yes, it will lead to the terrible situation where a learners completes the course and it doesn't get registered. Followed by an absolutely the worst kind of conversation with said learner :)



    b) keep connection alive



    c) build your own warning popup. It's a simple OnTimer action with 29 minutes delay (in case of a 30 minute session) that resets on each page. When it fires, just say "Oops, you've been away for too long, your session has expired, please re-open the course" and exit course (force-close the window).