Skip to main content
Inspiring
June 4, 2015
Question

Proper syntax for Javascript in Captivate 8?

  • June 4, 2015
  • 2 replies
  • 929 views

I am trying to use javascript (in CP 😎 to control the user's score that is passed to the LMS. I have tried the following code as an On Enter Action on the last slide of my course:

SCORM2004_CallSetValue("cmi.score.scaled","")

SCORM2004_CallSetValue("cmi.score.scaled","0")

SCORM2004_CallSetValue("cmi.core.lesson_status”,””)

SCORM2004_CallSetValue("cmi.core.lesson_status”,”0”)

I've been testing in Scorm Cloud but so far the code above has not had any affect on the score. Is there something missing from my code?

This topic has been closed for replies.

2 replies

TLCMediaDesign
Inspiring
November 25, 2015

You are mixing SCORM 2004 and SCORM 1.2.

cmi.core.lesson_status is a 1.2 value, 2004 is "cmi.success_status" or "cmi.completion_status". They work in conjunction depending on how the manifest is configured, Not the same as 1.2 at all. Also "0" is not a valid value.

cmi.score_scaled valid values are -1 to 1.

It's difficult to make your own calls if you publish with SCORM as there is already success criteria encoded by Captivate.

All SCORM calls with ".core" are 1.2

Known Participant
December 6, 2015

What is the correct Syntax on Enter Action JS -> SCORM2004_CallSetValue("cmi.core.lesson_status","Complete") for SCORM 1.2 ?

TLCMediaDesign
Inspiring
December 7, 2015

SCORM_CallLMSSetValue("cmi.core.lesson_status", "completed");

The valid values are:

  • passed
  • failed
  • completed
  • incomplete
  • browsed
  • not attempted
Known Participant
November 25, 2015

Hi,

Have you found a solution? I have the same question.

/Jacob