Highlighted

Completed course does not reset to first slide on subsequent access

New Here ,
Jan 16, 2017

Copy link to clipboard

Copied

This is apparently not a new issue as there is an unresolved thread from 2013 HERE.

The issue comes when the user has fulfilled the requirements for course completion and tries to re-enter the course.  Apparently, there are Captivate variables that will retain data on the last slide accessed.  The previous thread suggested to clear this "resume" data.  I have tried this and had some success.  I tried placing the JavaScript on the "On Enter" event with no effect.  When trying to place the execution of the JavaScript on the "On Exit" event, the suggested JavaScript appears to correctly reset the resume data but the final slide never exits.  So, by using an advanced action I combined the JavaScript execution (on the current window) followed by a simple Exit.  This appears to work except that if the user closes the window before the OnExit event fires,  the Resume Data is never cleared.  I tried firing the JavaScript from an earlier event like when the user clicks the exit button (which resides on the main menu).  Adding the JavaScript execution and a Jump to Slide apparently still logs resume data and so the final slide is logged as the resume point. did not work as

To review:  I have been able to get a subsequent attempt at a completed course to properly restart at the beginning slide.  The caveat to this solution is that the user could exit the final slide before the OnExit event fires.  If this happens, then a relaunch of the course will take the learner to the final slide.

Has anyone else discovered any other solution?  The value of allowing this is that folks can get refreshers of the lessons they previously completed.

Views

1.2K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Completed course does not reset to first slide on subsequent access

New Here ,
Jan 16, 2017

Copy link to clipboard

Copied

This is apparently not a new issue as there is an unresolved thread from 2013 HERE.

The issue comes when the user has fulfilled the requirements for course completion and tries to re-enter the course.  Apparently, there are Captivate variables that will retain data on the last slide accessed.  The previous thread suggested to clear this "resume" data.  I have tried this and had some success.  I tried placing the JavaScript on the "On Enter" event with no effect.  When trying to place the execution of the JavaScript on the "On Exit" event, the suggested JavaScript appears to correctly reset the resume data but the final slide never exits.  So, by using an advanced action I combined the JavaScript execution (on the current window) followed by a simple Exit.  This appears to work except that if the user closes the window before the OnExit event fires,  the Resume Data is never cleared.  I tried firing the JavaScript from an earlier event like when the user clicks the exit button (which resides on the main menu).  Adding the JavaScript execution and a Jump to Slide apparently still logs resume data and so the final slide is logged as the resume point. did not work as

To review:  I have been able to get a subsequent attempt at a completed course to properly restart at the beginning slide.  The caveat to this solution is that the user could exit the final slide before the OnExit event fires.  If this happens, then a relaunch of the course will take the learner to the final slide.

Has anyone else discovered any other solution?  The value of allowing this is that folks can get refreshers of the lessons they previously completed.

Views

1.2K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 16, 2017 0
Most Valuable Participant ,
Jan 16, 2017

Copy link to clipboard

Copied

Is there a reason why you don't use this:

ResumeData.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 16, 2017 0
New Here ,
Jan 17, 2017

Copy link to clipboard

Copied

If we never sent the resume data, then learners wouldn't be able to start up where they left off.  Granted, checking this would solve the other issue, allowing learners who completed the course to return to the course start for a refresher.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 0
Contributor ,
Jan 16, 2017

Copy link to clipboard

Copied

If you want bookmarking in case the user doesn't finish the course, you can't check Never Send Resume Database. We solve it very simply by adding a button (and appropriate instruction) on the last slide that jumps to the first slide.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 16, 2017 1
New Here ,
Jan 17, 2017

Copy link to clipboard

Copied

This might be a good solution for us.  If the learner hits the final "adios" slide, completes the course, and then later comes back, if there was a button to restart on the final slide, this would solve the issue. This is a much simpler fix and my previous JavaScript suggestion.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 0
Adobe Community Professional ,
Jan 17, 2017

Copy link to clipboard

Copied

Try entering this JavaScript on slide enter of the last slide or whichever slide that the user has completion and can exit from.

SCORM_SetBookmark("Slide_1")

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 0
New Here ,
Jan 17, 2017

Copy link to clipboard

Copied

Is there something else you are not providing with your suggestion?  This did not work.  I placed this exact statement on the "On Enter" event for the final slide.  Instead of "Slide_1", I used the name for the slide (which is "Objectives"). After exiting and relaunching, I am jumped to the final slide yet again...  bookmarking does not seem to be working with the way I am configuring it,

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 0
Contributor ,
Jan 17, 2017

Copy link to clipboard

Copied

We prefer simple when possible! This solution has always worked for us.

This is our final slide in every course:

SNAG13-0367.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 1
Adobe Community Professional ,
Jan 17, 2017

Copy link to clipboard

Copied

It could be that Captivate is overwriting on exit. I have manipulated the scormdriver.js to change the bookmarking. I have a blog about it on our website.

you can also add a window unload listener and put the script in there, that will override what Captivate is doing.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 0
New Here ,
Jan 17, 2017

Copy link to clipboard

Copied

Yes, I believe Captivate is overwriting.  I am unfamiliar with your blog and website.  Could you please provide the URL for the blog post itself?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 0
Adobe Community Professional ,
Jan 17, 2017

Copy link to clipboard

Copied

www.tlcmediadesign.com

I can't access it from my current location so I don't know the full URL.

You can Google: Google

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 17, 2017 0
New Here ,
Jan 19, 2017

Copy link to clipboard

Copied

@ TLCMediaDesign - I am unfamiliar with what you mean by a "window unload listener".  You might need to provide an example for me to understand where you are suggesting I go.  I have tried several SCORM JavaScript lines.  The slide I would like the course to restart on (after it had previously been completed) is called "Objectives". 

I have tried several SCORM JavaScript lines in the OnEnter event of the closing slide.  Nothing has worked.  It seems that the variables get reset between when the user enters the slide and whenever the user exits prematurely (clicking the X) or naturally (allowing the slide to play through).  On the slide's On Exit action, I have been able to use the following JavaScript line (coupled with an exit action) within an advanced action slide.  This works ...except the user must allow the slide to play all the way through.  If the user closes down prematurely, the On Exit won't fire. 

Again, for courses which had previously been completed, I would like the course to restart on a slide is called "Objectives" (which is like the main menu slide). 

Here are the lines I tried using the On Enter event for the closing slide...to no avail:

SCORM_SetBookmark("Objectives");

SCORM_CallLMSSetValue("cmi.core.lesson_location", "Slide_Objectives");

SCORM_CallLMSSetValue("cmi.suspend_data", "");

SCORM_LMSSetValue("cmi.core.lesson_location","Slide_1");

Am I using these line improperly?  Are there other SCORM commands that might help? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 19, 2017 0
Adobe Community Professional ,
Jan 19, 2017

Copy link to clipboard

Copied

put this in the index file just under the first <script> tag

window.onbeforeunload = function()

{

     SCORM_CallLMSSetValue("cmi.core.lesson_location", "Objectives");

     SCORM_CallLMSSetValue("cmi.suspend_data", "");

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 19, 2017 0
New Here ,
Jan 19, 2017

Copy link to clipboard

Copied

The current "onbeforeunload" is set to "DoFinish".  Should I include this into the function call?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 19, 2017 0
New Here ,
Jan 19, 2017

Copy link to clipboard

Copied

I believe I have your suggestion working in part.  However, right now, it's responding as if I have the "Never Send Resume Data" always checked (LMS Adv Settings). 

Again, I only want the course to reset to the Objectives slide when the previous user session reached the closing slide (which would indicate the user completed the lesson).  In every other case, the course should resume right where the last user session ended.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 19, 2017 0
Adobe Community Professional ,
Jan 20, 2017

Copy link to clipboard

Copied

Because Captivate always return to the slide from which the course was exited, I think you need to change the bookmark function.

Try replacing the bookmark function in the scormdriver.js with this script. If you completion and exit are on the last slide of the project, when Captivate writes the bookmark, this function will automatically bookmark the first slide using the first slide label. If the slide does not have a label it will write :Slide_1" which is how Captivate bookmarks slides with no label. Do not edit this script with your label, it will pull it for you.

function SCORM_SetBookmark(strBookmark) {

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

    SCORM_ClearErrorInfo();

    

   if ( window.cpInfoCurrentSlide == window.cpInfoSlideCount )

   {

  var fs = cp.model.data.project_main.slides.split(",");

 

  if ( cp.model.data[fs[0]].lb == "" )

  {

   return SCORM_CallLMSSetValue("cmi.core.lesson_location", "Slide_1");    }

  else

  {    

   return SCORM_CallLMSSetValue("cmi.core.lesson_location", cp.model.data[fs[0]].lb);

  }

   }

   else

   {

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

   }

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 20, 2017 0
New Here ,
Jan 20, 2017

Copy link to clipboard

Copied

I am new to changing this file (but not new to JavaScript) and do not understand what it might mean for managing our other courses.  As such, I wonder how this solution (changing a core JS file) might be rolled out for all future published courses.  Captivate assembles the necessary files when publishing.  So, I assume it has a "master" copy of this JS file which it uses when the user publishes a project?  If it doesn't work that way, then it sounds like I would need to manually add the changed JS file to each newly published ZIP.  Could you please confirm my thinking on this?  Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 20, 2017 0
Adobe Community Professional ,
Jan 20, 2017

Copy link to clipboard

Copied

The template file is here for CP8, I don't have CP9 on this machine, but I think the path is very similar:

C:\Program Files\Adobe\Adobe Captivate 8 x64\Templates\Publish\LMS\Standard\SCORM\Default\1_2\scormdriver.js

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 20, 2017 0
New Here ,
Jan 20, 2017

Copy link to clipboard

Copied

After swapping the functions out, I believe it is working except for one use case.  What if the user closes the course before the closing slide completes?    Apparently, the "On Enter" event fires, but the On Exit does not and as such does not trigger the bookmark function to return to the first slide on a subsequent access.  If the course is exited this way, when the user returns to the course, they would be brought back to the closing slide and would need to let this slide play all the way through in order for the bookmark to be properly set according to this new function.

Is there a way to accommodate this use case?  If I force setting the bookmark with the On Enter event for the closing slide, the bookmark seems to be overwritten with a bookmark for the closing slide.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 20, 2017 0
Adobe Community Professional ,
Jan 21, 2017

Copy link to clipboard

Copied

In that case I would add an enter slide listener with JavaScript and run the same script. You would put this in the head of the index.html file here:

C:\Program Files\Adobe\Adobe Captivate 9 x64\HTML\index.html

The script has a slight delay before executing to hopefully let Captivate bookmark, then the script waits one second then writes the first slide bookmark.

var interfaceObj, eventEmitterObj, interval = null;

window.addEventListener( 'moduleReadyEvent', function ( e )
{
interfaceObj = e.Data;
eventEmitterObj = interfaceObj.getEventEmitter();
initializeEventListeners();
});

function initializeEventListeners()

if ( interfaceObj )
{
     if ( eventEmitterObj )
  {
   eventEmitterObj.addEventListener( 'CPAPI_SLIDEENTER', function ( e )
   {        
    if ( window.cpInfoCurrentSlide == window.cpInfoSlideCount )
    {
     interval = setInterval( setLast, 1000, e );
    }
   });
  }
}
}

function setLast( e )
{  
var fs = cp.model.data.project_main.slides.split(","); 

if ( cp.model.data[fs[0]].lb == "" )
{

  SCORM_CallLMSSetValue("cmi.core.lesson_location", "Slide_1");  
}
else
{
  SCORM_CallLMSSetValue("cmi.core.lesson_location", cp.model.data[fs[0]].lb);

}

clearInterval( interval );
interval = null;
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 21, 2017 0
New Here ,
Jan 23, 2017

Copy link to clipboard

Copied

I certainly appreciate the technical help you've provided, but I believe I may have to make adjustments that will be less invasive.  My solution may be more an issue of adjusting the usability and design of the slides rather than rewiring the internals of the standard Captivate files (even though it is a very clever solution).  I can foresee a nightmare in trying to manage the scormdriver.js and index.htm changes when a new Captivate version comes out.   As I watch other courses produced by SkillSoft, Lynda, etc., I see that this issue really doesnt exist because there is really not a "exit/closing" slide.  

While it may require an adjustment in all our courses, it may be the preferable way to go.   If there is more to managing the Captivate internal files that I might be missing, I am open to hearing about how one accomplishes this.  Otherwise, I may need to simply adjust our closing slides so that the returning user can restart the course. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 23, 2017 0
Adobe Community Professional ,
Jan 23, 2017

Copy link to clipboard

Copied

You can create your own bookmark function with the same name as the one in the scormdriver.js. As long as it's loaded after that function, yours is the one that will be used.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 23, 2017 0
New Here ,
Jan 24, 2017

Copy link to clipboard

Copied

QUESTION:  If a new Captivate update were loaded, would the scormdriver.js, index.htm (etc.) files be overwritten with the base version?  If so, then whatever custom changes which I added to the file would be overwritten. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 24, 2017 0
Adobe Community Professional ,
Jan 24, 2017

Copy link to clipboard

Copied

Only if they updated the scormdriver.js.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 24, 2017 0
New Here ,
Apr 20, 2020

Copy link to clipboard

Copied

Hi Team,

 

Could you please help me in resolving the below issue.

 

On the result slide when user click Exit button course gets exit. But when the user is back using the same link from the LMS. Course get starts from the Assement page. Instead it should get start to 1st slide of the course. Is there any way to resolve this issue.

 

Regards,

Ashwin Shejwal

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 20, 2020 0