Our course developers are using Lectora by Trivantis to generate a SCORM package. The package contains all the course work, some are quite long - 4 to 8 hours long. The problem is students are using the Close button for the browser window (upper right corner) instead of the Save and Exit button provided by Lectora. When a student clicks the Close button, their course progress is not saved by the LMS. In an eight hour course, this stings more than a little.
I would very much like to get in front of the close (unload) event by using the onBeforeUnload event. I have written JavaScript that works in the SCORM Cloud for all browsers and most recent versions.
I have tried altering the titlemgr.html provided by Trivantis, but IE fails to display the message to warn off using the Close button in Moodle; however, in SCORM Cloud this approach works for all browsers and most recent versions.
Where do you suggest I place this JavaScript so when a student clicks the Close button, a message displays warning them off and to use the Save and Exit button? I have versions of the JS for DOM and HTML. I have the ability to modify the PHP or JS files in the mod/scorm directory.
Thank you in advance.