Search code examples
javascriptscormscorm1.2

Problem getting the progress of the course in SCORM package


I'm trying to use API for SCORM. I do not understand some points:

  1. When I start the course and perform some tasks of the course. Should I be made progress in the parent window? Is this algorithm embedded in the package?

  2. Which parameters must necessarily be passed to SCORM (cmi.*)

The code in which I'm trying to get values ​​(progress, etc)

<script>   
    window.API = new window.simplifyScorm.ScormAPI();
    window.API.apiLogLevel = 1;
    var json = {
        "core": {
            "student_id": "1",
            "student_name": "Student",
            "lesson_status": "incomplete",
        }
    };
    window.API.loadFromJSON(json); 
    window.API.LMSInitialize();
   window.open('file:///D:/testScrom/index.html', 'ScormPlayer');
    setInterval(function(){
        console.log(window.API.cmi.toJSON());
    }, 2000);
</script>

Solution

  • What I see above is SCORM 1.2... so cmi.core.lesson_status is all the status you get. It's passed, failed, not attempted, incomplete or completed. Creator of the content really decides which status takes precedence.

    As for mastery, thats more in line with your score.raw vs the mastery threshold. So per above the author may of set "complete" but the score could be something the LMS could look at for a level of passed vs. failed.