Forum Discussion
Looking for example SCORMs for an LMS
Hey,
I'm currently working on integrating a SCORM 2004 course titled "employee-health-and-wellness-sample-course-scorm2004_2-YVpCR5M_.zip" on my LMS panel. However, when I try to track the learner's progress, no data is being returned.
I have a mock script in place for tracking SCORM activity, but it seems that progress data isn't being captured. Here's the script I'm using:
<script>
function onIframeLoad() {
console.log("SCORM iframe loaded SJ");
}
const iframe = document.getElementById('scormIframe');
if (iframe) {
iframe.addEventListener('load', onIframeLoad);
}
window.API_1484_11 = {
dataModel: {},
Initialize: function(param) {
console.log("SCORM 2004 Initialize called SJ with:", param);
return "true";
},
Terminate: function(param) {
console.log("SCORM 2004 Terminate called SJ with:", param);
console.log("Final SCORM 2004 Data Model SJ:", this.dataModel);
return "true";
},
GetValue: function(element) {
console.log("SCORM 2004 GetValue called for SJ:", element);
return this.dataModel[element] || "";
},
SetValue: function(element, value) {
console.log("SCORM 2004 SetValue called for SJ:", element, "with value:", value);
this.dataModel[element] = value;
if (element === "cmi.completion_status") {
console.log("Completion status updated SJ:", value);
}
return "true";
},
Commit: function(param) {
console.log("SCORM 2004 Commit called SJ");
return "true";
},
GetLastError: function() {
return "0"; // No error
},
GetErrorString: function(errorCode) {
return "No error";
},
GetDiagnostic: function(errorCode) {
return "No diagnostic information SJ";
}
};
</script>
Related Content
- 7 months ago
- 10 months ago
- 7 months ago