Skip to main content
Participating Frequently
December 7, 2020
Question

How to report score to a custom LMS

  • December 7, 2020
  • 1 reply
  • 189 views

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?

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    December 7, 2020

    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

    Lilybiri
    Legend
    December 7, 2020

    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