Forum Discussion
MuhammadHaseeb-
2 years agoCommunity Member
Import variable from SCROM to moodle LMS
I have made an e-learning course in articulate storyline 360, which is having a variable name score, that is updated on viewing each slide, so I want to get the value of the variable score and expor...
Jürgen_Schoene_
Community Member
here is a more universal method to find the lms
https://community.articulate.com/discussions/articulate-storyline/lmsapi-setscore-is-not-working
try this
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);
console.log( "lmsAPI", lmsAPI );
var player = GetPlayer();
var myScore = player.GetVar("LMS");
console.log( "myScore", myScore );
lmsAPI.SetScore(myScore,100,80);
with the two lines "console.log" you get debug info for the browser console -> F12
MuhammadHaseeb-
2 years agoCommunity Member
thanks for commenting