Skip to main content
Known Participant
January 14, 2016
Answered

What code can I add to Complete based on SCO's location?

  • January 14, 2016
  • 1 reply
  • 364 views

I have a vendor file that does not complete unless KT's are answered correctly.  (They are already published and I don't have the source files) I need to know if there is a code I can add to the html that would complete the course if the learner makes it to the last slide entitled "Conclusion".  I tried by adding this code : I checked our  the SCORM log to identify the slide titles as Conclusion.

    var lesson_location = LMSGetValue("cmi.core.lesson_location");

function LastSlide_Finish () {

    if(lesson_location=="Conclusion")

   LMSSetValue("cmi.core.lesson_status", "completed");

   }

   }   

.

    This topic has been closed for replies.
    Correct answer TLCMediaDesign

    Edit this function in the scormdriver.js Add in the bold text.

    function SCORM_SetBookmark(strBookmark) {

    if ( strBookmark == "Conclusion" )

    {

    SCORM_CallLMSSetValue("cmi.core.lesson_status", "completed");

    }

        WriteToDebug("In SCORM_SetBookmark strBookmark=" + strBookmark);

        SCORM_ClearErrorInfo();

        return SCORM_CallLMSSetValue("cmi.core.lesson_location", strBookmark);

    }

    1 reply

    TLCMediaDesign
    Inspiring
    January 14, 2016

    Is this a SWFor HTML5 or both?

    And do you know what version of Captivate published the files?

    RocwonAuthor
    Known Participant
    January 14, 2016

    Both

    TLCMediaDesign
    Inspiring
    January 14, 2016

    I'm not sure where that code is, but how is the function triggered?

    Do you know what version of Captivate?

    At the very least the variable should be inside the function:

    function LastSlide_Finish () {

    var lesson_location = LMSGetValue("cmi.core.lesson_location");

        if(lesson_location=="Conclusion")

       LMSSetValue("cmi.core.lesson_status", "completed");

       }

       }