AngularJS Service for SCORM wrapper library.
Members
(static) heartbeatDelay :number
Heartbeat interval (in milliseconds).
- Default Value:
- 1500000
- Source:
Type:
-
number
(private, static) scorm
Service for SCORM Wrapper Library. https://github.com/pipwerks/scorm-api-wrapper
- Source:
- To Do:
-
- Check whether this is actually used by anything.
(private, static, nullable) entryStatus :string
Internal storage for SCORM entry status.
- Source:
Type:
-
string
(private, static) saved :Object
Internal storage for SCORM service data.
- Source:
Type:
-
Object
Methods
(static) inIframe() → {boolean}
Checks whether game was loaded in an iframe
- Source:
Returns:
- Type:
-
boolean
(static) init()
Initialize SCORM service and listeners.
- Source:
Listens to Events:
- window.event:message
(static) isConnected() → {boolean}
Check whether SCORM service is connected.
- Source:
Returns:
- Type:
-
boolean
(static) provideEntryStatus() → (nullable) {string}
Get stored value from module:scormService.entryStatus
- Source:
Returns:
- Type:
-
string
(static) provideSavedScore() → (nullable) {number}
Get stored SCORM score
.
- Source:
Returns:
- Type:
-
number
(static) provideLessonStatus() → (nullable) {string}
Get stored SCORM lesson_status
.
- Source:
Returns:
- Type:
-
string
(static) provideUser() → {Object}
Get stored SCORM user
.
- Source:
Returns:
- Type:
-
Object
(static) initScores()
Initialize scores in SCORM service.
- Source:
(static) setScore(number)
Sent set
message for score to SCORM service.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
number |
number
|
The score value. |
(static) getScore()
Send get
message for score from SCORM service.
(static) getLessonStatus()
Send get
message for lesson status from SCORM service.
(static) getEntryStatus()
Send get
message for entry status from SCORM service.
(static) getUser()
Send get
message for user from SCORM service.
- Source:
- See:
(static) checkCompletion() → {boolean}
Check whether lesson status is completed.
- Source:
Returns:
- Type:
-
boolean
(static) setCompletion(complete)
Send set
message for completion status to SCORM service.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
complete |
boolean
|
The completion state. |
(static) startHeartbeat()
Start SCORM heartbeat.
(static) getVersion()
Send version
message to SCORM service.
- Source:
(static) get(model)
Send get
message for an arbitrary data model element from SCORM service.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
model |
string
|
SCORM data model element. |
(static) set(model, value)
Send set
message for an arbitrary data model element from SCORM service.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
model |
string
|
SCORM data model element. |
value |
*
|
Value for SCORM element. |
(static) save()
Calls pipwerks.SCORM.data.save()
which calls LMSCommit()
.
Instructs the LMS to persist all data to this point in the session.
- Source:
(static) finish()
Closes parent $window if parent $window is top most $window.
Closing $window triggers pipwerks.SCORM.connection.terminate()
.
- Source:
(private, static) versionCallback()
Handler for SCORM version
message.
- Source:
(private, static) getHandler(data)
Handler for SCORM get
messages.
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object
|
Message object.
|
(private, static) setHandler(data)
Handler for SCORM set
messages.
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object
|
Message object.
|
(private, static) getScoreCallback(data)
Callback for SCORM get
message for score.
Used by module:scormService.getHandler
- Source:
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
data |
Object
|
Message object.
|
(private, static) lessonStatusCallback(data)
Callback for SCORM get
messages for lesson status.
Used by module:scormService.getHandler
- Source:
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
data |
Object
|
Message object.
|
(private, static) entryStatusCallback(data)
Callback for SCORM get
messages for entry status.
Used by module:scormService.getHandler
- Source:
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
data |
Object
|
Message object.
|