One way to work around this would be to include a close/exit button in your course and have that:
- call LMSFinish, then
- close the window
The adapt-close extension is part of the way there already, if you were to remove the if...else conditions from this function, so that it looks like this instead:
onCloseConfirm: function() {
//ensure that the browser prompt doesn't get triggered as well
var config = Adapt.course.get('_close');
config.browserPromptIfIncomplete = config.browserPromptIfComplete = false;
var scorm = require('extensions/adapt-contrib-spoor/js/scorm/wrapper');
if (scorm) scorm.getInstance().finish();
top.window.close();
}
then that should do the trick... though I suspect you'd also need to delay the call to top.window.close
slightly because, as we know, the work the LMS is trying to do to save the data is asynchronous... something like _.delay(function() { top.window.close() }, 250);
should do it...
Obviously you are relying on the learner remembering to close the course via the close/exit button that is in your course, that's something you'll just have to make clear/reinforce via course instruction text.