//Dummy SCORM Run-Time Environment //Intrallect Ltd 2005 // create SCORM RTE API Object (must be called "API") var API = new scormAPI(); // ********** objects and methods ********* // function scormAPI() { this.checkState = true; objScormAPI = this; this.cmiData=new Hashtable(); // this.cmiData.put("cmi.core.lesson_status","incomplete"); } scormAPI.prototype.LMSInitialize = function (parameter) { return "true"; } scormAPI.prototype.LMSGetValue = function (element) { //just get the value (if any) stored in the hash table var value=objScormAPI.cmiData.get(element); value=value+''; // cast value object to string return value; } scormAPI.prototype.LMSSetValue = function (element, value) { //just set the value in the hash table objScormAPI.cmiData.put(element,value); return "true"; } scormAPI.prototype.LMSCommit = function (parameter) { return true; } scormAPI.prototype.LMSFinish = function (parameter) { return "true"; } scormAPI.prototype.LMSGetLastError = function () { return "0"; } scormAPI.prototype.LMSGetErrorString = function (errorCode) { return "No error"; } scormAPI.prototype.LMSGetDiagnostic = function (errorCode) { return "IntraLibrary includes only a dummy implementation of the SCORM Run-Time Environment"; }