API Commit / Terminate + Set a cmi.score.max

Engaged ,
May 03, 2018 May 03, 2018

Copy link to clipboard

Copied

Hi there

I am doing some tests with the SCORM 2004 Commit and Terminate API calls. I am setting manually a score with the console and also use a JS script in Captivate.

I see that in the console I can change the raw and scaled score, change the completed and passed status and then execute Commit and Terminate.

This saves both the score and the completion status.

In Captivate I put a code on the last slide OnEnter that changes the score and completion status + Commit line.

I leave out purposely the Terminate line because I have a button with the action "Exit" attached to it. I thought the Exit button would execute the Terminate line by design. The answer is No.

If I attach a JS with Terminate line to the same button, the score and status are sent.

So my question is - why wouldn't the Exit action send a Terminate command?

On another note, I am trying to set the maximum score with a line setting cmi.score.max. The line is OnEnter and it works, I can check the max score is set to 100 as I want. However, at the end the stats show that I passed with 100 out of 0. So the max score has not been recorded.

What I can do is use this sequence on the last slide OnEnter and it works fine

SCORM2004_CallSetValue('cmi.score.max',100);

SCORM2004_CallSetValue('cmi.score.raw',100);

SCORM2004_CallSetValue('cmi.score.scaled',1);

SCORM2004_CallSetValue('cmi.completion_status','completed');

SCORM2004_CallSetValue('cmi.success_status','passed');

SCORM2004_CallCommit();

+ I hook a Terminate call to the Exit button as explained in the first part of my post.

All that is ok, but I was wondering why the following would not work, if I hook the cmi.score.max call to the first slide + I add Commit call to the same OnEnter JS action, the max score is kept only while I am on the slide. As soon as I move to the last slide, the max score is set to 0. And again I end up with a message "You scored 100 out of 0" What is the reasoning behind that?

Thanks in advance!

B

Views

170

Likes

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
no replies

Have something to add?

Join the conversation