javascriptscormarticulate-storyline

Scorm reporting


I am trying to integrate a articulate SCORM 2004 file into our angular system.

I am loading the SCORM files using iframes

<script src="bower_components/scorm/custom.js"></script> 
<iframeset ng-controller="ScormTestController as scormCtrl">
    <iframe src="scorm_test/scormFile_da/story.html" name="story"frameborder="0">
</iframe> </iframeset>

My issue is that the SCORM players lmsAPI is not called when i finish the test. at the moment our api is just a skeleton to see if the calls are made

function IsLmsPresent(){ return true; }

function SetScore(args){ console.log('SetScore') }

function SetFailed(){ console.log('SetFailed'); }

function SetPassed(){ console.log('SetPassed'); }

function Finish(){ console.log('Finish'); }

IsLmsPresent() i called when the SCORM package is first loaded but using javascript debugger i can see that it dosn't perform any callbacks in LMSAPI.js while the user is performing the test


Solution

  • Solved the issue by modifying Claude Ostyns SCORM wrapper. http://www.ostyn.com/standards/scorm/samples/proddingSCOwrap.htm#download

    <iframeset ng-controller="ScormTestController as scormCtrl">
        <iframe style="width:100%; height: 100%" 
             src="scorm_test/lbScormWrapper02.html?sco=beoplay_da/index_lms.html" 
             name="API_1484_11" frameborder="0">
        </iframe>
    </iframeset>