Copy link to clipboard
Copied
I need help with Captivate 7.0.1.237 - on Windows 7
I don't want to use slides viewed OR quiz score to send a completion to the LMS
I have researched javascript - on the web - and the best I can come up with is shown below
var CaptivateObj = document.Captivate;
g_objAPI.LMSSetValue('cmi.core.lesson_status', 'completed');
g_objAPI.LMSCommit('');
g_objAPI.LMSFinish('');
I have tried setting the script to Top, parent, current, new - and have tested a TEST Captivate SCORM package on SCORM Cloud
I have created a simple 5 slide package - with the javascript executing ON EXIT for slide 2 - on slide 3 I have an exit button
IT doesn't work - that is, it doesn't send a completion
I can send the sample Captivate file with the embedded javascript if that would help
Phil Camillo
Those are old SCORM calls. The "g_objAPI" doesn't exist.
use:
SCORM_CallLMSSetValue('cmi.core.lesson_status', 'completed');
SCORM_CallLMSCommit();
SCORM_CallLMSFinish();
Since these functions exist outside of Captivate, you do not need to funs the Captivate object.
Copy link to clipboard
Copied
Try putting the javascript in the onEnter for slide 2. Using onExit is a little tricky to wrap your head around.
Copy link to clipboard
Copied
Thanks Dan
I will try this right now - I have really struggled to find ANYTHING out there on script to send a SCORM completion
Do you think the javascript I wrote looks like it will work?
P
Copy link to clipboard
Copied
Looks reasonable.
Add console.log ("hello javascript"); and then check your console in chrome (F12) to ensure that your code is running.
(remove any console.log() statements from production code since IE will throw an error on it)
Copy link to clipboard
Copied
OK - will try this
BTW - I am not a javascript guy - I just happened to know about SCORM - and through searching a number of sites - gobbled together the script - which, like you said - looks "reasonable"
Phil
Copy link to clipboard
Copied
Hi Dan - same result with adding to ON ENTER - still getting an incomplete when tested at SCORM cloud
Copy link to clipboard
Copied
Like I said, add the console.log statement to ensure that your code is even running, and/or there are no errors showing up in the console
Copy link to clipboard
Copied
Those are old SCORM calls. The "g_objAPI" doesn't exist.
use:
SCORM_CallLMSSetValue('cmi.core.lesson_status', 'completed');
SCORM_CallLMSCommit();
SCORM_CallLMSFinish();
Since these functions exist outside of Captivate, you do not need to funs the Captivate object.
Copy link to clipboard
Copied
Thanks so much for the new code - I will try this right away
Question - does it make any difference in the javascript settings - if I set it to either top, parent, current or new?
Thanks again
Phil
Copy link to clipboard
Copied
I always use the default "current"
Copy link to clipboard
Copied
AWESOME - AWESOME - AWESOME!!!!
IT WORKED - thank you so much - WOW
The only thing is that it exited at the completion - which is probably the SCORM_CallLMSFinish(); command
I will take that out - so I just have Commit
Copy link to clipboard
Copied
HI,
I was looking out for similar solution and found you have answered it.
I am newbie and not from programming background. Can you help me what is current and when should we paste the code to let LMS know the course status is complete.
Thanks in advance.
Copy link to clipboard
Copied
Just paste the code on Enter of the slide where you want to register completion.
If I understand you correctly "current" is the window the script should be executed in. In this case and almost all cases, it should be "current".
Copy link to clipboard
Copied
Hi there, I wanted to share my experiences.
Using Captivate 2017 and SharePoint LMS.
The following works well with SCORM 1.2 but NOT with SCORM 2004. Need to specify that I hook the script to a button, not to OnEnter event.
SCORM_objAPI.LMSSetValue("cmi.core.lesson_status", "completed");
SCORM_objAPI.LMSCommit('');
SCORM_objAPI.LMSFinish('');
The following works neither with 1.2 nor with 2004
SCORM_CallLMSSetValue('cmi.core.lesson_status', 'completed');
SCORM_CallLMSCommit();
SCORM_CallLMSFinish();
I am ok with it since 1.2 works well for me. However, from purely theoretical point of view, what is that I am missing?
Thanks
Bobby
PS. Great blog TLC guys! BTW, can one use the Console of the F12 Developper tools change the status from there?
Copy link to clipboard
Copied
Brilliant! Worked for me! Thanks for posting!
Note that SCORM_objAPI.LMSFinish(''); closes the window/exits the course, so making a trigger on a button makes sense.
I used your two lines as a javascript trigger when the timeline starts:
SCORM_objAPI.LMSSetValue("cmi.core.lesson_status", "completed");
SCORM_objAPI.LMSCommit('');
Then have an exit button where I just use the built-in Exit trigger.
Copy link to clipboard
Copied
Hey All, Nice to see this for SCORM, any chance there is a version that will work with AICC?
Thanks,
Tim Munroe
Copy link to clipboard
Copied
Never used AICC, but you can try this:
AICC_TranslateLessonStatusToAICC("C")
Copy link to clipboard
Copied
Thanks, TLC. This worked perfectly with SCORM and EdApp.
Much better than Captivate's Success/Complete Criteria.
Put your code on an EXIT button, and the course is exited and a "completion" is recorded. PERFECT!
Copy link to clipboard
Copied
Most of the solutions provided here are dependent on the particular protocol (SCORM 1.2 / 2004, AICC, etc)
I have found that if you simply the run the line below built in functionality will use whichever protocol is appropriate and send the completion status.
SetReachedEnd()
Copy link to clipboard
Copied
For scorm 2004 set completion status use below code in the end of the slide.
set in javascript :- SetReachedEnd();