Using jQuery to close course window

Hi Everyone,


I was hoping someone could help me with an issue I'm experiencing with the LMS where the course will not close by clicking onto the close button (which has an action of on mouse click, Exit Title/Close Window). We believe this is also causing the completion status to not be sent through to the LMS. (The modify variable action to set AICC_Lesson_Status to "passed" is on the Close button as well as the Passed page.)


The LMS provider has suggested the following:


I've got a bit of a workaround for you if it's easier. Once you've set the SCORM completion details you can change the display properties on a hidden div on our launching page. This will pop up the "Module completion" box that the users will be familiar with and navigate them back to the LMS main screen.


The code I use in jQuery is:

$('#completed_block', window.parent.document).css('display', 'block'); <- so the ID of the div is "completed_block".



Can anyone tell me step by step how I can implement this code into my course?


Any suggestions would be greatly appreciated!


UPDATE


This issue was resolved by implementing a Run Javascript action on the Exit button.


The script was: top.location.href = "your URL";


The URL was the course access page to where the user could select from their assigned courses.


What we found was that because the course was being launched in an iframe within the browser window (due to the LMS conditions) we needed to return back to a particular page within that same window. So this action managed to achieve that.

Discussions have been disabled for this post