Forum Discussion

ScottMcGee-daa8's avatar
ScottMcGee-daa8
Community Member
29 days ago
Solved

CMI5 Course Pass/Fail & Complete/Incomplete

Hi,

Our LMS team after nearly a year, finally understood the issue I'm having. 

Unlike Scorm cloud where I test, we discovered that unlike scorm cloud "Complete when all units are Complete and Not Failed", our LMS provider only looks for complete/incomplete.

All triggers in CMI5 regardless of whether it's using a trigger, or tracking when publishing. Automatically used the verb "completed".

Is there a way using Javascript to trigger a

//if they pass
lmsAPI.SetReachedEnd();
lmsAPI.SetPassed();

or 

//if they fail
lmsAPI.SetFailed();

The reason we have to use CMI5 other than it being better than TinCan, our LMS only stores API data, I've done test's with them using SCORM 2004 and 1.2 using an xAPI statment, but unless I put an xAPI statement for everything. It's just simpler to use CMI5. 

They class Scorm clouds "Complete when all units are Complete and Not Failed" as a product update that could take a while to sort out. 

So I'm just hoping anyone has an idea on how to Fail a course without triggering a completion in CMI5. 

I'm fine with Javascript, but can't find anything to help me out on this one.

  • After several hours and forums I figured it out. Someone else wrote this so can't take credit, but hopefully anyone searching for this via CMI5 will find that this works (In my LMS it does).

    Pass/Complete

    //Get LMS API
    function findLMSAPI(win) {
    if (win.hasOwnProperty("GetStudentID")) return win;
    else if (win.parent == win) return null;
    else return findLMSAPI(win.parent);
    }

    var lmsAPI = findLMSAPI(this);

    //Set Completed status
    lmsAPI.SetReachedEnd();
    //Set Passed status
    lmsAPI.SetPassed();


    Failed/Incomplete

    //Get LMS API
    function findLMSAPI(win) {
    if (win.hasOwnProperty("GetStudentID")) return win;
    else if (win.parent == win) return null;
    else return findLMSAPI(win.parent);
    }

    var lmsAPI = findLMSAPI(this);

    //Set Completed status
    lmsAPI.ResetStatus();
    //Set Passed status
    lmsAPI.SetFailed();

  • After several hours and forums I figured it out. Someone else wrote this so can't take credit, but hopefully anyone searching for this via CMI5 will find that this works (In my LMS it does).

    Pass/Complete

    //Get LMS API
    function findLMSAPI(win) {
    if (win.hasOwnProperty("GetStudentID")) return win;
    else if (win.parent == win) return null;
    else return findLMSAPI(win.parent);
    }

    var lmsAPI = findLMSAPI(this);

    //Set Completed status
    lmsAPI.SetReachedEnd();
    //Set Passed status
    lmsAPI.SetPassed();


    Failed/Incomplete

    //Get LMS API
    function findLMSAPI(win) {
    if (win.hasOwnProperty("GetStudentID")) return win;
    else if (win.parent == win) return null;
    else return findLMSAPI(win.parent);
    }

    var lmsAPI = findLMSAPI(this);

    //Set Completed status
    lmsAPI.ResetStatus();
    //Set Passed status
    lmsAPI.SetFailed();