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

Proper syntax for Javascript in Captivate 8?

Explorer ,
Jun 04, 2015 Jun 04, 2015

I am trying to use javascript (in CP 8) 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?

806
Translate
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
Explorer ,
Nov 25, 2015 Nov 25, 2015

Hi,

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

/Jacob

Translate
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
People's Champ ,
Nov 25, 2015 Nov 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

Translate
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
New Here ,
Dec 06, 2015 Dec 06, 2015

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

Translate
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
People's Champ ,
Dec 07, 2015 Dec 07, 2015

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

The valid values are:

  • passed
  • failed
  • completed
  • incomplete
  • browsed
  • not attempted
Translate
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
New Here ,
Dec 15, 2015 Dec 15, 2015
LATEST

Thnaks for your return TLCMediaDesign

I have tried the following code :

SCORM_objAPI.LMSSetValue('cmi.core.lesson_status', 'passed');

SCORM_objAPI.LMSCommit('');

and it's working.

Translate
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
New Here ,
Dec 06, 2015 Dec 06, 2015

Could you give me a sample of javascript code to access the LMS variables like cmi.core.lesson_status scorm1.2 ?

Thank you.

Translate
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