Closed isaturk66 closed 3 years ago
You need to include the release file, not the source code files. https://github.com/gabrieldoty/simplify-scorm/releases/tag/2.0.0
How silly of me! I retried with the release file in two ways but couldn't manage to make it work anyway.
Firstly, I included the file and put some hook listeners in the "scormcontent/index.html" file which is the launch file of my scorm2004 application
When I ran it, there was no error like the one I encountered before. However, I can not get any log, my hooks are not triggered.
Secondly, I created another file and imported my launch file with an iframe:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="./scormAPI.js"></script>
<script>
window.API_1484_11.on("Initialize", function() {
console.log("Initialize hook")
});
window.API_1484_11.on("SetValue", function(CMIElement, value) {
console.log("set val");
});
</script>
</head>
<body>
<iframe src="./scormcontent/index.html" height="900" width="500" title="Iframe Example"></iframe>
</body>
</html>
Same problem. No error but there is no log whatsoever even if advance in the scorm training.
Note: There is also no log when I include this line
window.API_1484_11.apiLogLevel = 1; // Log everything (Debug)
I expect that I am missing something obvious but I don't think I will be the only one who will miss that obvious think. Therefore, This issue may serve as a dummy guide when the problem is solved
Turns out I missed something obvious!! Dear SCORM beginners, your launch file is not scormcontent/index.html, it is scormdriver/indexAPI.html. I hope this thread will help someone one day.
@isaturk66 What do you use to create content scrom?
I have a scorm2004 package that I exported from rise.com with the file structure of this: (You can see simplfy scorm repo files in there as well)![image](https://user-images.githubusercontent.com/35339000/106767423-e675eb00-664b-11eb-9ac6-20c36c18ab9d.png)
You can download the said package here.
The launch file is scormcontent/index.html so I imported the scormAPI.js at that file
<script type="text/javascript" src="../simplify-scorm/src/scormAPI.js"></script>
However, I got this error:![image](https://user-images.githubusercontent.com/35339000/106770899-779a9100-664f-11eb-94ca-f743ae29dc98.png)
I am new with scorm but I believeI obeyed the given instructions on the README.md which says
I hope I made myself clear.