How to report score to a custom LMS

Community Beginner ,
Dec 07, 2020

Copy link to clipboard

Copied

I'm trying to report {score} and the other standard variables from the Quiz Results page to our custom LMS by posting to an api endpoint, can anyone help? I assume by adding an Execute JavaScript action to On Enter of the Quiz Results page, like this? 

 

var xhr = new XMLHttpRequest();
xhr.open("POST", endpoint, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({
    score: 'score',
accuracy: 'percent' }));

 

I'm trying to use SCORM, is this how it usually works or is there another method for reporting? How is the user identification usually handled?

Views

37

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Dec 07, 2020

Copy link to clipboard

Copied

Also, I don't see any reference to score in window.cpAPIInterface, only in CPAPI_QUESTIONSUBMIT but that seems to be per slide rather than total

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Lilybiri LATEST
Most Valuable Participant ,
Dec 07, 2020

Copy link to clipboard

Copied

I will leave the JS part to the 'experts', but you may have a look at this blog, which has a table with the Quizzing System variables which you seem not to know about:

µhttp://blog.lilybiri.com/using-quizzing-system-variables

 

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more