function submitNextInQueue(){SubmitQueue._submitNext()}function submitCommand(){if(null==enrollment_activity_id)return void console.error("The courseware window has lost contact with the LMS. The courseware window should be closed and relaunched from this page.");var e={id:enrollment_activity_id,cmi:JSON.stringify(cmi)},r=$.param(rbk),i=scorm_server_url+"?"+r,n={url:i,data:e,type:"POST"};if(rbk.finished)if("undefined"!=typeof navigator&&navigator.sendBeacon){var t=new FormData;t.append("id",enrollment_activity_id),t.append("cmi",JSON.stringify(cmi)),navigator.sendBeacon(i,t)}else n.async=!1,$.ajax(n);else n.async=CS_USE_ASYNC,SubmitQueue.add(n);return!0}var cmi={core:{}},enrollment_activity_id=null,course_id=null,CS_Initialized=0,CS_Finished=0,CS_USE_ASYNC=!0,warnedUser=!1,rbk={finished:!1,debug:"undefined"!=typeof debugScorm&&debugScorm},scorm_server_url="/rte_scorm/server",SubmitQueue={pending:new Array,errors:new Array,add:function(e){this.pending.push(e),this._submitNext()},_submitNext:function(){this.errors.length?0==warnedUser&&(courseware_window.alert("We're sorry, there seems to be an error with this courseware.\n\nPlease exit the course, and try again later."),warnedUser=!0,cmi.core.error="101"):!$.active&&this.pending.length&&(options=this.pending.shift(),$.ajax(options))}};