Forum Discussion
Lucio
6 years agoCommunity Member
If ever the "Works in all" portion doesn't work as is, try preceding it with the following script:
var player = GetPlayer();
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);
… and the rest following "...GetPlayer() …"