gabrieldoty / simplify-scorm

Scorm 1.2 Javascript API
MIT License
230 stars 77 forks source link

A little more example code would be useful. #16

Open trevski opened 5 years ago

trevski commented 5 years ago
    window.API_1484_11.on("Terminate", function () {
        var simplifiedObject = window.API_1484_11.cmi.toJSON();
        alert(JSON.stringify(simplifiedObject));
    });

is working fine

however I can't seem to read in values from the LMS.

    window.API_1484_11.on("GetValue.cmi.learner_id", function (CMIElement, value) {
        value = '123';
    });

    window.API_1484_11.on("Initialize", function () {
        alert('initialize SCORM');
    });

I am getting the "initialize SCORM" alert OK but the learner_id is not being returned on terminate.

Obviously I am doing something stupid.

xob commented 5 years ago

There already is example code for initial values.

sijuthankachan commented 4 years ago

i m new to scorm. i have scorm zip file. how i make it play in html and integrate the simplify-scorm? can you share the html file sample file with player and simplify-scorm integartion?