Skip to main content

Class: NoopAdapter

Defined in: adapters/noop.ts:10

No-op tracker adapter. Used for previews (astro dev, ?print=1, test runs) where no LMS is present. Records state internally so components that read tracker.state get consistent values, but never talks to any external API.

Phase 0: only adapter shipped. Phase 1 introduces ScormAgainAdapter12.

Implements​

Constructors​

Constructor​

new NoopAdapter(): NoopAdapter

Returns​

NoopAdapter

Accessors​

interactions​

Get Signature​

get interactions(): readonly InteractionResult[]

Defined in: adapters/noop.ts:77

Test-only accessor. Not part of the Tracker contract.

Returns​

readonly InteractionResult[]


state​

Get Signature​

get state(): TrackerState

Defined in: adapters/noop.ts:66

Read-only snapshot of the tracker's current understanding of lesson state.

Returns​

TrackerState

Read-only snapshot of the tracker's current understanding of lesson state.

Implementation of​

Tracker.state

Methods​

complete()​

complete(): Promise<void>

Defined in: adapters/noop.ts:47

Mark the lesson complete — translated per standard (lesson_status, completion_status, etc.).

Returns​

Promise<void>

Implementation of​

Tracker.complete


fail()​

fail(): Promise<void>

Defined in: adapters/noop.ts:57

Terminal-fail.

Returns​

Promise<void>

Implementation of​

Tracker.fail


init()​

init(): Promise<boolean>

Defined in: adapters/noop.ts:19

Establish an LMS connection (or a no-op for unlaunched contexts). Returns true on success.

Returns​

Promise<boolean>

Implementation of​

Tracker.init


pass()​

pass(): Promise<void>

Defined in: adapters/noop.ts:52

Terminal-pass. complete() is still required separately unless the adapter fuses them.

Returns​

Promise<void>

Implementation of​

Tracker.pass


recordInteraction()​

recordInteraction(interaction): Promise<void>

Defined in: adapters/noop.ts:34

Parameters​

interaction​

InteractionResult

Returns​

Promise<void>

Implementation of​

Tracker.recordInteraction


setBookmark()​

setBookmark(bookmark): Promise<void>

Defined in: adapters/noop.ts:29

Opaque resume location. SCORM 1.2 caps this at ~4 KB; the adapter enforces that cap.

Parameters​

bookmark​

string

Returns​

Promise<void>

Implementation of​

Tracker.setBookmark


setProgress()​

setProgress(progress): Promise<void>

Defined in: adapters/noop.ts:24

Progress is a scaled value in [0, 1].

Parameters​

progress​

number

Returns​

Promise<void>

Implementation of​

Tracker.setProgress


setScore()​

setScore(score): Promise<void>

Defined in: adapters/noop.ts:39

Parameters​

score​

Score

Returns​

Promise<void>

Implementation of​

Tracker.setScore


terminate()​

terminate(): Promise<void>

Defined in: adapters/noop.ts:62

Flush buffered state and close the LMS API connection. Idempotent.

Returns​

Promise<void>

Implementation of​

Tracker.terminate