Forum Discussion
TristanDF
3 months agoCommunity Member
Sending Points to the LMS using Javascript
I have a quiz that contains 14 free-form questions and one custom built question for a total of 15 points. Variable: customScore stores the custom question result. Variable: quiz.ScorePoints stores...
MathNotermans-9
3 months agoCommunity Member
Better to share a sample...as is this is touch to debug.
One thing i always use in my Javascripts calling the lmsAPI is this function.
var lmsAPI = findLMSAPI(this);
function findLMSAPI(win) {
if (win.hasOwnProperty("GetStudentID")) {
return win;
}else if (win.parent == win) {
return null;
}else {
return findLMSAPI(win.parent);
}
}
As different LMS's handle the lmsAPI different. This to ensure you have it available.