Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / mod / resource / type / ims / dummyapi.js
blob2a956948eb0fff9ce604cc930ddda87b550aa336
1 /*
2 * Dummy SCORM API
3 */
4  
5 function GenericAPIAdaptor(){
6         this.LMSInitialize = LMSInitializeMethod;
7         this.LMSGetValue = LMSGetValueMethod;
8         this.LMSSetValue = LMSSetValueMethod;
9         this.LMSCommit = LMSCommitMethod;
10         this.LMSFinish = LMSFinishMethod;
11         this.LMSGetLastError = LMSGetLastErrorMethod;
12         this.LMSGetErrorString = LMSGetErrorStringMethod;
13         this.LMSGetDiagnostic = LMSGetDiagnosticMethod;
16 * LMSInitialize.
18 function LMSInitializeMethod(parameter){return "true";}
20 * LMSFinish.
22 function LMSFinishMethod(parameter){return "true";}
24 * LMSCommit.
26 function LMSCommitMethod(parameter){return "true";}
28 * LMSGetValue.
30 function LMSGetValueMethod(element){return "";}
32 * LMSSetValue.
34 function LMSSetValueMethod(element, value){return "true";}
36 * LMSGetLastErrorString
38 function LMSGetErrorStringMethod(errorCode){return "No error";}
40 * LMSGetLastError
42 function LMSGetLastErrorMethod(){return "0";}
44 * LMSGetDiagnostic
46 function LMSGetDiagnosticMethod(errorCode){return "No error. No errors were encountered. Successful API call.";}
48 var API = new GenericAPIAdaptor;