Custom function capgemini_evaluation_call to send interaction data to LMS

Feb 19, 2021

I have created a custom function capgemini_evaluation_call to send interaction data to LMS

but I am getting this error message when I try to execute Javascript code from Storyline

[‎2/‎19/‎2021 11:15 AM]  Mulchandani, Satish Parmanand: 

No Title

function cagemini_evaluation_call(str){    

            var evalArray = str.split("~cg0~");

    for(var i = 0; i < evalArray.length; i++) {

       // Trim the excess whitespace.

       evalArray[i] = evalArray[i].replace(/^\s*/, "").replace(/\s*$/, "");

       // Add additional code here, such as:  

                  var dataArray = evalArray[i].split("~cg1~");                          

            var sId = dataArray[0];

            var sStudent_response = dataArray[1];

            var blnCorrect = "neutral";

            var strCorrectResponse = "1";

            var strDescription = "";

            var intWeighting =1;

                                    var intLatency ="";

            var strLearningObjectiveID = "cg_evaluation";

            var dtmTime = "0000:00:10:56";           

                                    var sType = "performance";

            var strAlternateResponse="none";

            var strAlternateCorrectResponse = "none";

                                   

            SCORM_RecordInteraction(sId, sStudent_response, blnCorrect, strCorrectResponse, strDescription,

                                                                                                intWeighting, intLatency, strLearningObjectiveID, dtmTime, sType,

                                                                                                strAlternateResponse, strAlternateCorrectResponse)

    }

}

 

 SCORMFunctions.js

Be the first to reply