Forum Discussion
Transferring HTML Project and SCORM Results to Articulate Storyline
https://easyupload.io/o38kv1
add attachemnt but i cant see. Uploaded this
- SamHill30 days agoSuper Hero
Hi nyanaa I don't understand why you are using Storyline to wrap this content? I would get rid of Storyline and just get yourself a SCORM wrapper, such as the https://github.com/pipwerks/scorm-api-wrapper.
If you want the content to scale, Storyline just uses a CSS transform to scale the content, and so you could do the same with JavaScript to ensure the content fills the browser and shrinks with it when resized.
I think including Storyline is unnecessary as you are not leveraging anything from Storyline.
If you want to continue with your set-up, you just need to start adding some debug into the LMS integration script so you can determine whether the content is finding the API. Just start outputting everything to the console.log. As an example:
function findSCORMAPI() { var win = window; var findAttempts = 0; var maxAttempts = 10; // Önce SCORM 1.2 API'sini ara while (win && findAttempts < maxAttempts) { findAttempts++; // SCORM 1.2 API'si if (win.API) { console.log("Found the SCORM 1.2 API"); return win.API; } // SCORM 2004 API'si if (win.API_1484_11) { console.log("Found the SCORM 2004 API"); return win.API_1484_11; } // Üst pencereye geç if (win.parent && win.parent !== win) { win = win.parent; } else { break; } } console.error("Could not find the SCORM API"); return null; }
Rather than looking for the LMS API, the Storyline published content will already do that for you, so all you really need to do, is leverage the Storyline SCORM communications instead, but because the WebObject is inserted via an iframe, you will need to call any function/object in Storyline using "parent."
For example, when you do this:
var player = GetPlayer();
You should be doing this:
// Get the player from the parent frame var player = parent.GetPlayer();
You can also check the scormdriver.js file for SCORM API functions that you can call. Storyline SCORM functions will determine if the API is SCORM 2004, or 1.2 so you don't need to make that decision.
So calling something like this:
parent.SCORM_SetScore(intScore, intMaxScore, intMinScore);
Storyline will then check the API, and call the appropriate SCORM API function.
Also, your script looks for both the SCORM 1.2 API and SCORM 2004 API, however, your script only includes the correct methods for SCORM 1.2 API. Therefore, if the SCORM 2004 API is found, the script will fail. For a start, the method names changed from LMSSetValue in SCORM 1.2 to SetValue in SCORM 2004.
In a nutshell, whenever you are calling a function/object in Storyline, for example getting a reference to the player, ensure you precede with "parent."
There is quite a lot wrong with the script, and it needs quite a bit of work to fix up. But if you continue with it, first add lots of console.log output so you can see where it is failing.
- nyanaa30 days agoCommunity Member
''If you want the content to scale, Storyline just uses a CSS transform to scale the content, and so you could do the same with JavaScript to ensure the content fills the browser and shrinks with it when resized.''
Do you have any recommendations or suggested resources for JavaScript? Could you share a guide on how I can learn it? Thank you very much in advance for your help