SCORM 2004: Issues with LMS, Adjusting course score and progress

Aug 06, 2023

I'm encountering compatibility problems with SCORM 2004 2nd edition in my Learning Management System (LMS). After switching from SCORM 1.2 to 2004 in Articulate Storyline, I face two main issues:

Score Conflict: Setting the score using "lmsAPI.SetScore()" also affects the progress.(I am aware that this is a scorm 1.2 feature but when I use the alternative lmsAPI.SetValue("cmi.score.scaled", 'value') the score is not set at all)

Course Progress Adjustment: Unable to update or adjust course progress using "cmi.progress_measure" or any other method in SCORM 2004.

I need assistance modifying my JavaScript code for SCORM 2004 compatibility. Any insights or code snippets are highly appreciated. Bellow the code I'm using, Thank you!

Code to set Score (works)

function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;

// all done if no parent
else if (win.parent == win) return null;

// climb up to parent window & look there
else return findLMSAPI(win.parent);
}

var lmsAPI = findLMSAPI(this);
var myscore=100;
lmsAPI.SetScore(myscore,100,0);

Code I used to retrieve Name and time ect (Works)

function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;

// all done if no parent
else if (win.parent == win) return null;

// climb up to parent window & look there
else return findLMSAPI(win.parent);
}

var lmsAPI = findLMSAPI(this);
var sessionAccumulatedTime=lmsAPI.GetSessionAccumulatedTime();
var previouslyAccumulatedTime =lmsAPI.GetPreviouslyAccumulatedTime()
var player=GetPlayer();
player.SetVar('previouslyAccumulatedTime',previouslyAccumulatedTime);
player.SetVar('sessionAccumulatedTime',sessionAccumulatedTime);

var name=lmsAPI.GetStudentName();
var player=GetPlayer();
player.SetVar('Name',name);

I tried Modifying my code, and using Scorm 2004 features instead such as cmi.progress_measure and cmi.score.scaled this way :

function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;

// all done if no parent
else if (win.parent == win) return null;

// climb up to parent window & look there
else return findLMSAPI(win.parent);
}

var lmsAPI = findLMSAPI(this);
lmsAPI.SetValue('cmi.score.min',0)
lmsAPI.SetValue('cmi.score.max',100)
lmsAPI.SetValue('cmi.score.scaled',80)

lmsAPI.SetValue('cmi.progress_measure',80)

 

Be the first to reply