SCORM 1.2 and 2004 Run-Time API
Lock Media offers clients a comprehensive SCORM API coupled with a managed hosting solution that includes a SCORM Run-Time Data model for all Learning Management System functionaility. If your looking for outsourcing options to host your e-learning content then contact Lock Media today.
SCORM 1.2 and 2004 API and Run-Time Data Model
The SCORM Run-Time API (application programming interface) is the communication machanism for informing the Learning Managmment System (LMS) of the communication state and between a sharable content learning object (SCO) and the LMS (e.g., inititlized, terminated, and/or in an error condition), and is used for retrieving and storing data (e.g., scores, time limits, bookmarking, etc.) between the LMS and the SCO.
Only launched Shareable Content Objects (SCOs) (not Assets) make use of the SCORM Run-Time Environment (RTE) API.
The SCORM API usage guidelines:
- The function names are all case-sensitive.
- The function parameters are all case-sensitive. Data model parameters are to be represented as lower case.
- Each call to an API function, other than Support methods (GetLastError, GetErrorString, GetDiagnostic), sets the error code.
- All parameters passed between the SCO and the API instance are treated as ECMAScript characterstring. All parameter values shall be compatible with the data types and formats described by the data models that use the API for communication.
SCORM API Instance
Once a SCO finds a SCORM API instance, the SCO is required, at a minimum, to issue Initialize("") and Terminate("") SCORM API calls.
SCORM API Communication Session
The SCORM API instance will establish a communication session with the RTE/LMS when Initialize() is called. The communication session will end when Terminate() is called.
The states an API instance transitions through:
- Not Initialized - before Initialize() is called
- Running - after Initialize() is successfully called and before Terminate() is successfully called
- Terminated - after Terminate() is successfully called
SCORM API Methods
The run-time SCORM API (application programming interface) methods provide a standardized way for SCOs to communicate with the LMS while shielding the communication implementation from the Sharable Content Object developer.
There are eight run-time API functions provided by the SCORM run-time environment:
- SetValue(parameter1, parameter2)
Lock Media has available the SCORM Run-Time API for use in a managed hosting environment. Lock Media can host all SCOs that are SCORM 1.2 or SCORM 2004 compliant for the API objects and methods.
SCORM Session Methods
Session methods are used to initiate and terminate data communication between a SCO and an API instance. Calling a session method may change the API instance's current error code.
The Initialize("") function is used to initiate the communication session. It allows the LMS to handle LMS specific initialization issues.
Initialize() parameters (all required):
- "" - always an empty string
- Initialize() return values: true - returned if communication session initialization was successful as determined by the LMS
- false - returned if the communication session initialization was not successful
- The Terminate("") function is used to terminate the communication session. It is used by the SCO when the SCO has determined that it no longer needs to communicate with the LMS.
- Terminate() parameters (all required): "" - always an empty string
- Terminate() return values: true - returned if communication session termination was successful as determined by the LMS
- false - returned if the communication session termination was not successful
SCORM Data-Transfer Methods
The GetValue(parameter) function requests information from the LMS. It permits the SCO to request information from the LMS, including the value of data model elements.
GetValue() parameters (all required):
- parameter - the name of a Run-time Data Model element (e.g. "learner.learner_id")
GetValue () return values:
- The value of the data model element parameter
- An empty characterstring ("") - if an error occurs (GetLastError() should be called to determine the nature of the error)
The SetValue(parameter1, parameter2) function is used to request the transfer to the LMS of the value of data model elements.
SetValue() parameters (all required):
- parameter1 - the name of a Run-time Data Model element (e.g. "learner.learner_id")
- parameter2 - the value to set the data model element to
SetValue() return values:
- true - returned if the value of parameter2 was accepted for the data model element parameter1
- false - if an error occurs (GetLastError() should be called to determine the nature of the error)
The Commit("") function requests forwarding to the persistent data store any data from the SCO that may have been cached by the API instance. The method can be used to guarantee that data set by SetValue() is persisted to reduce the likelihood that data is lost due to communication session interruption or abnormal session termination prior to a call to Terminate().
Commit() parameters (all required):
- "" - always an empty string
Commit() return values:
- true - returned if the commit succeeded
- false - returned if the commit failed
SCORM Support Methods
The GetLastError() function requests the error code for the current error state of the API instance.
GetLastError() parameters (all required):
GetLastError() return values:
- the error code reflecting the current error state of the API instance
The GetErrorString(parameter) function retrieves a textual description of the current error state.
GetErrorString() parameters (all required):
- parameter - an error code (e.g. "301")
GetLastError() return values:
- the LMS-specific error string for the passed error code (maximum length of 255 characters)
The GetDiagnostic(parameter) function exists for LMS specific use and allows the LMS to define additional diagnostic information through the API instance.
GetDiagnositc() parameters (all required):
- parameter - an implementer-specific value for diagnostics
GetDiagnositc () return values:
- the LMS-specific diagnostic string for the passed parameter
Learn more about the Run-Time Data Model