Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

constructor

  • new default(debug: boolean): default

Properties

Private apiHandle

apiHandle: any

The API (SCORM 1.2) or API_1484_11 (SCORM 2004) object which contains the SCORM Runtime API.

Private apiIsFound

apiIsFound: boolean

True is the wrapper did find the SCORM Runtime API.

Private connectionIsActive

connectionIsActive: boolean

Is the connection is active or not.

Private dataCompletionStatus

dataCompletionStatus: any

Completion status value.

Private dataExitStatus

dataExitStatus: any

Exit mode value.

Private debugModeEnabled

debugModeEnabled: boolean

Turn on/off logging in trace().

Private handleCompletionStatus

handleCompletionStatus: boolean

Should the wrapper handle completion status when running initialize().

Private handleExitMode

handleExitMode: boolean

Should the wrapper handle exit mode when running terminate().

version

version: string

The SCORM Runtime version.

Methods

findApi

  • findApi(win: any): any
  • Looks for an object named API (SCORM 1.2) or API_1483_11 (SCORM 2004) in parent and opener windows.

    Parameters

    • win: any

      the window object

    Returns any

getApi

  • getApi(): any
  • Looks for an object named API (SCORM 1.2) or API_1483_11 (SCORM 2004), first in the current window's frame hierarchy and then, if necessary, in the current window's opener window hierarchy (if there is an opener window).

    Returns any

getApiHandle

  • getApiHandle(): any
  • Returns the handle to API (SCORM 1.2) or API_1483_11 (SCORM 2004) object if it was previously set.

    Returns any

getCode

  • getCode(): number
  • Requests the error code for the current error state from the LMS.

    Returns number

getDiagnosticInfo

  • getDiagnosticInfo(errorCode: number): string
  • "Exists for LMS specific use. It allows the LMS to define additional diagnostic information through the API Instance."

    Parameters

    • errorCode: number

    Returns string

getInfo

  • getInfo(errorCode: number): string
  • "Used by a SCO to request the textual description for the error code specified by the value of [errorCode]."

    Parameters

    • errorCode: number

    Returns string

getState

  • getState(parameter: string): string
  • Requests information from the LMS.

    Side effects:

    • Sets the class property dataCompletionStatus when "cmi.core.lesson_status" (SCORM 1.2) or "cmi.completion_status" (SCORM 2004) is requested.
    • Also sets class property dataExitStatus when "cmi.core.exit" (SCORM 1.2) or "cmi.exit" (SCORM 2004) is requested.

    Parameters

    • parameter: string

      parameter name of the SCORM data model element

    Returns string

getStatus

  • getStatus(): string
  • Get completion status value.

    Returns string

    Current completion status value.

initialize

  • initialize(): boolean
  • Tells the LMS to initiate the communication session.

    Returns boolean

isAvailable

  • isAvailable(): boolean
  • A simple function to allow Flash ExternalInterface to confirm presence of JS wrapper before attempting any LMS communication.

    Returns boolean

save

  • save(): boolean
  • Instructs the LMS to persist all data to this point in the session.

    Returns boolean

setState

  • setState(parameter: string, value: string): boolean
  • Tells the LMS to assign the value to the named data model element. Also stores the SCO's completion status in a variable named completionStatus. This variable is checked whenever terminate() is invoked.

    Parameters

    • parameter: string

      The data model element

    • value: string

      The value for the data model element

    Returns boolean

setStatus

  • setStatus(status: string): boolean
  • Set completion status.

    Parameters

    • status: string

      completion status we want to set.

    Returns boolean

stringToBoolean

  • stringToBoolean(value: any): boolean
  • Converts 'boolean strings' into actual valid booleans. (Most values returned from the API are the strings "true" and "false".)

    Parameters

    • value: any

    Returns boolean

terminate

  • terminate(): boolean
  • Tells the LMS to terminate the communication session.

    Returns boolean

trace

  • trace(msg: string): void
  • Displays error messages when in debug mode.

    Parameters

    • msg: string

      message to be displayed

    Returns void

Generated using TypeDoc