System:
Captivate 8 x64
Windows 7 x64
SCORM 1.2
I "thought" SCORM_objAPI was the correct API to call the cmi.core features.
So cpQuizInfoPointsscored is readonly
and cpQuizInfoTotalPointsscored is read only too?
That sounds an awful lot like "what you want isn't possible."
But that's just my thoughts... Thank you for yours!
~ Sean
They definitely are read only if you try to set them from within Captivate. Not so sure if everything is exposed in JavaScript. Don't really have time right now to test all of that. Getting to your script, try this:
Put this function in the head of the HTML page.
function submit_score()
{
var cp = document.Captivate;
var sendScore = cp.cpEIGetValue("m_VarHandle.quiz_score");
SCORM_SetValue("cmi.core.score.raw", Number(sendScore));
SCORM_SetValue('cmi.core.lesson_status', 'passed');
SCORM_Finish('EXIT_TYPE_FINISH', 'true');
}
On you last page, click a button and execute the JavaScript
submit_score();