• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to report score to a custom LMS

Community Beginner ,
Dec 07, 2020 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

90

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 07, 2020 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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources