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?
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
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