Class XAPIEvent

Hierarchy (view full)

Constructors

Properties

data: XAPIData
extras?: {
    bubbles?: boolean;
    external?: boolean;
}
type

Methods

  • Get bubbling status

    Returns boolean

    true if bubbling false otherwise

  • Get the statements verb id.

    Parameters

    Returns null | {
        display: Record<string, string>;
        id:
            | "http://adlnet.gov/expapi/verbs/answered"
            | "http://adlnet.gov/expapi/verbs/asked"
            | "http://adlnet.gov/expapi/verbs/attempted"
            | "http://adlnet.gov/expapi/verbs/attended"
            | "http://adlnet.gov/expapi/verbs/commented"
            | "http://adlnet.gov/expapi/verbs/completed"
            | "http://adlnet.gov/expapi/verbs/exited"
            | "http://adlnet.gov/expapi/verbs/experienced"
            | "http://adlnet.gov/expapi/verbs/failed"
            | "http://adlnet.gov/expapi/verbs/imported"
            | "http://adlnet.gov/expapi/verbs/initialized"
            | "http://adlnet.gov/expapi/verbs/interacted"
            | "http://adlnet.gov/expapi/verbs/launched"
            | "http://adlnet.gov/expapi/verbs/mastered"
            | "http://adlnet.gov/expapi/verbs/passed"
            | "http://adlnet.gov/expapi/verbs/preferred"
            | "http://adlnet.gov/expapi/verbs/progressed"
            | "http://adlnet.gov/expapi/verbs/registered"
            | "http://adlnet.gov/expapi/verbs/responded"
            | "http://adlnet.gov/expapi/verbs/resumed"
            | "http://adlnet.gov/expapi/verbs/scored"
            | "http://adlnet.gov/expapi/verbs/shared"
            | "http://adlnet.gov/expapi/verbs/suspended"
            | "http://adlnet.gov/expapi/verbs/terminated"
            | "http://adlnet.gov/expapi/verbs/voided"
            | "http://adlnet.gov/expapi/verbs/downloaded"
            | "http://adlnet.gov/expapi/verbs/copied"
            | "http://adlnet.gov/expapi/verbs/accessed-reuse"
            | "http://adlnet.gov/expapi/verbs/accessed-embed"
            | "http://adlnet.gov/expapi/verbs/accessed-copyright";
    }

    Verb or null if no verb with an id has been defined. If the parameter full is true, the return type is an object with an id property (the verb with full url) and a display property (a record of translated labels, for instance { "en-US: "Answered" }).

  • Parameters

    • full: false

    Returns null | XAPIVerb

  • Parameters

    • Optionalfull: undefined

    Returns null | XAPIVerb

  • Figure out if a property exists in the statement and return it

    Parameters

    • keys: string[]

      List describing the property we're looking for. For instance ['result', 'score', 'raw'] for result.score.raw

    Returns unknown

    The value of the property if it is set, null otherwise.

  • Prevent this event from bubbling up to parent

    Returns void

  • Try to schedule an event for externalDispatcher

    Returns boolean

    true if external and not already scheduled, otherwise false

  • Set the actor. Email and name will be added automatically.

    Returns void

  • Set the context part of the statement.

    Parameters

    Returns void

  • Set the object part of the statement.

    The id is found automatically (the url to the content)

    Parameters

    Returns void

  • Set scored result statements.

    Parameters

    • score: number
    • maxScore: number
    • instance: IH5PContentType<unknown>
    • completion: boolean
    • success: boolean

    Returns void