Forum Discussion
Everything we know about Cornerstone on Demand and Storyline!
Hey, Chris -
Here's the complete API reference for SCORM 2004. The second link is a printable poster:
https://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/
https://scorm.com/scorm-explained/scorm-resources/reference-poster/
One of the easier ways to see what's going on is to register for a SCORM Cloud account at http://cloud.scorm.com
Using this tool, you can see the log of all of the API calls made in a Storyline module. It's one of the best ways that I have found to troubleshoot a module. I've pasted an example of a debug log below. Here you see:
- Initialization of the API. In CSOD, when you click launch, the window changes state to loading. Then a new window is launched with your content. This window uses a unique identifier for the learning object and the user to tell the API where in the database to look for the user's information and where to put it.
- The first thing Storyline does is get the lesson_mode. This will almost always return as normal. I have seen where some cases returned review but only in older versions of Moodle. This tells the course how to run (browse, normal, or review). I don't think storyline will set anything but normal but I could be wrong.
- Then Storyline requests the lesson_status. Lesson status is how the LMS knows you're done or not. In a new launch, you'll probably see 'not attempted'. If SL receives not attempted, it will respond to the LMS to set it to 'incomplete'. In CSOD, this is translated to In Progress.
- I expanded the line below at 05:32:772 to show what the SCORM Cloud is doing in response to a request.
- The line you see for LMSGetValue('cmi.core.student_name') isn't something that Storyline requests. I added that in a Javascript trigger. I used that information to display the name of the participant in a text field and also to generate an xAPI agent (another complicated explanation) to report data to an LRS in addition to the LMS and enable a 'trainer's gradebook' of simulation actions that we could not provide in CSOD.
- This module is set to not retain progress and start fresh with every launch. So you're not seeing any suspend_data calls. After each slide change, you should see an LMSSetValue('cmi.suspend_data') call. This sends the "LMS Cookie" to the LMS so when you resume the SL runtime knows how to suss it out.
- When the learner has met the conditions for completion (Quiz result, slide count, completion trigger), the score and lesson status are sent from the SL file.
+ [00:05:47.364] LMSSetValue('cmi.core.score.raw', '100') returned 'true' in 0.001 seconds
+ [00:05:47.365] LMSSetValue('cmi.core.score.max', '100') returned 'true' in 0 seconds
+ [00:05:47.365] LMSSetValue('cmi.core.score.min', '0') returned 'true' in 0 seconds
+ [00:05:47.365] LMSSetValue('cmi.core.lesson_status', 'completed') returned 'true' in 0.001
- And finally, when you exit the module, the session_time is recorded with a call from SL to set that value, the exit state is set to "suspend", LMSCommit is called, as is LMSFinish. This cleans everything up, ensures the right values are sent to the LMS, and closes out the API connection. You can't send anything else after LMSFinish (LMS dependent) until you again initialize the API.
[23:52:10.198] LMSCommit('') returned 'true' in 0 seconds
[23:52:10.198] Checking for Commit Error
[23:52:10.198] Call is error free.
- [23:52:10.198] LMSFinish('')
[23:52:10.198] Checking for Finish Error
[23:52:10.198] Call is error free.
[23:52:10.198] Close Out Session
[23:52:10.198] Mode = normal
[23:52:10.198] Credit = credit
[23:52:10.198] CompletionStatus = completed
[23:52:10.198] SuccessStatus = unknown
[23:52:10.198] MasteryScore = null
[23:52:10.198] Score = 100
[23:52:10.198] Sco was taken for credit
[23:52:10.198] Sco is completed so resetting credit to no-credit and mode to review
[23:52:10.198] Next entry is normal
[23:52:10.199] Session Time: PT12M43.35S (76335 hundredths)
[23:52:10.199] Previous Time: PT0H0M0S (0 hundredths)
[23:52:10.199] New Total Time: PT12M43.35S (76335 hundredths)
[23:52:10.199] New Tracked Total Time: PT12M45.98S
Example log from SCORM Cloud
[00:05:29.786] Beginning prerequisites evaluation of activity loan_01
[00:05:29.786] Beginning prerequisites evaluation of activity loan_01
[00:05:29.786] Beginning prerequisites evaluation of activity loan_01_SCO
+ [00:05:32.771] LMSInitialize('') returned 'true' in 0 seconds
+ [00:05:32.771] LMSGetValue('cmi.core.lesson_mode') returned 'normal' in 0 seconds
[00:05:32.771] LMSGetLastError() returned '0' in 0 seconds
+ [00:05:32.771] LMSGetValue('cmi.core.lesson_mode') returned 'normal' in 0.001 seconds
[00:05:32.772] LMSGetLastError() returned '0' in 0 seconds
+ [00:05:32.772] LMSGetValue('cmi.core.lesson_status') returned 'not attempted' in 0 seconds
[00:05:32.772] LMSGetLastError() returned '0' in 0 seconds
- [00:05:32.772] LMSSetValue('cmi.core.lesson_status', 'incomplete') returned 'true' in 0.002 seconds
[00:05:32.773] CheckForSetValueError (cmi.core.lesson_status, incomplete, cmi.core.lesson_status, , )
[00:05:32.773] Element is: lesson_status
[00:05:32.773] Call is error free.
[00:05:32.774] StoreValue (cmi.core.lesson_status, incomplete, cmi.core.lesson_status, , )
[00:05:32.774] Element is: lesson_status
[00:05:32.774] StatusSetInCurrentSession = false, CompletionStatus=unknown
[00:05:32.774] Allowing status change
[00:05:32.774] RunTimeApi_ImmediateRollup called
[00:05:32.774] Transferring RTE data to Activity data
[00:05:32.774] Rolling up activity data
- [00:05:32.774] LMSSetValue('cmi.core.exit', 'suspend') returned 'true' in 0 seconds
[00:05:32.774] CheckForSetValueError (cmi.core.exit, suspend, cmi.core.exit, , )
[00:05:32.774] Element is: exit
[00:05:32.774] Call is error free.
[00:05:32.774] StoreValue (cmi.core.exit, suspend, cmi.core.exit, , )
[00:05:32.774] Element is: exit
- [00:05:32.903] LMSGetValue('cmi.core.student_name') returned 'Flowers, Steve' in 0 seconds
[00:05:32.903] CheckForGetValueError (cmi.core.student_name, cmi.core.student_name, , )
[00:05:32.903] Call is error free.
[00:05:32.903] RetrieveGetValueData (cmi.core.student_name, cmi.core.student_name, , )
[00:05:32.903] Element is: student name
[00:05:32.903] LMSGetLastError() returned '0' in 0 seconds
+ [00:05:32.903] LMSGetValue('cmi.core.student_name') returned 'Flowers, Steve' in 0 seconds
[00:05:32.903] LMSGetLastError() returned '0' in 0 seconds
[00:05:32.925] Beginning prerequisites evaluation of activity loan_01
[00:05:32.925] Beginning prerequisites evaluation of activity loan_01
[00:05:32.925] Beginning prerequisites evaluation of activity loan_01_SCO
+ [00:05:36.152] LMSGetValue('cmi.core.student_name') returned 'Flowers, Steve' in 0 seconds
[00:05:36.152] LMSGetLastError() returned '0' in 0 seconds
+ [00:05:36.152] LMSGetValue('cmi.core.student_name') returned 'Flowers, Steve' in 0 seconds
[00:05:36.152] LMSGetLastError() returned '0' in 0 seconds
+ [00:05:47.364] LMSSetValue('cmi.core.score.raw', '100') returned 'true' in 0.001 seconds
+ [00:05:47.365] LMSSetValue('cmi.core.score.max', '100') returned 'true' in 0 seconds
+ [00:05:47.365] LMSSetValue('cmi.core.score.min', '0') returned 'true' in 0 seconds
+ [00:05:47.365] LMSSetValue('cmi.core.lesson_status', 'completed') returned 'true' in 0.001 seconds
[00:05:47.516] Beginning prerequisites evaluation of activity loan_01
[00:05:47.516] Beginning prerequisites evaluation of activity loan_01
[00:05:47.516] Beginning prerequisites evaluation of activity loan_01_SCO
[00:05:47.668] Beginning prerequisites evaluation of activity loan_01
[00:05:47.668] Beginning prerequisites evaluation of activity loan_01
[00:05:47.668] Beginning prerequisites evaluation of activity loan_01_SCO
+ [00:06:00.778] LMSSetValue('cmi.core.session_time', '0000:00:28.0') returned 'true' in 0.001 seconds
+ [00:06:00.779] LMSSetValue('cmi.core.exit', 'suspend') returned 'true' in 0 seconds
+ [00:06:00.779] LMSCommit('') returned 'true' in 0 seconds
+ [00:06:00.779] LMSFinish('') returned 'true' in 0.001 seconds
+ [00:06:00.780] Pre-evaluation of exit action
+ [00:06:01.231] OverallSequencingProcess for SCORM 1.1 / SCORM 1.2 returned '' in 0.632 seconds
+ [00:06:01.912] OverallSequencingProcess for SCORM 1.1 / SCORM 1.2