new NullAdapter()
Implementation of Null adapter. It is default adapter for WBT.
Extends
Members
-
<readonly> bookmark
-
Current bookamrk
- Inherited From:
- Default Value:
-
- ''
Properties:
Type Description string -
<readonly> completed
-
Indicates if course is completed
- Inherited From:
- Default Value:
-
- false
Properties:
Type Description boolean -
<readonly> dispatcher
-
Dispatcher to recieve signals from adapter
- Inherited From:
- Default Value:
-
- null
Properties:
Type Description coreutils.Signal -
<readonly> isConnected
-
Indicates if adapter is connected
- Inherited From:
- Default Value:
-
- false
Properties:
Type Description boolean -
<readonly> language
-
Current language
- Inherited From:
- Default Value:
-
- ''
Properties:
Type Description string -
<readonly> userID
-
Current user id
- Inherited From:
- Default Value:
-
- ''
Properties:
Type Description string -
<readonly> userName
-
Current user name
- Inherited From:
- Default Value:
-
- ''
Properties:
Type Description string
Methods
-
<abstract, protected> _getBookmark()
-
Get saved bookmark
- Inherited From:
Returns:
bookmark- Type
- string | null
-
<protected> _getConfigProperty(id)
-
Get property from adapter config.
Parameters:
Name Type Description idstring - Inherited From:
Returns:
value- Type
- string | null
-
<abstract, protected> _getCourseCompleted()
-
Check if the current course is completed
- Inherited From:
Returns:
completed- Type
- boolean
-
<abstract, protected> _getLanguage()
-
Get current language from url
- Inherited From:
Returns:
current language- Type
- string
-
<protected> _getObjectiveIndexByID(id)
-
Get tracked item index
Parameters:
Name Type Description idstring tracked id - Inherited From:
Returns:
index- Type
- number | null
-
<abstract, protected> _getObjectivesCount()
-
Get total count of objectives
- Inherited From:
Returns:
count- Type
- number
-
<abstract, protected> _getUserID()
-
Get user id from server
- Inherited From:
Returns:
user id- Type
- string | null
-
<abstract, protected> _getUserName()
-
Get user name from server
- Inherited From:
Returns:
user name- Type
- string | null
-
<protected> _initData()
-
Init adapter data on connect
- Inherited From:
-
<protected> _initIndexes(objectives)
-
Init tracked items indexes
Parameters:
Name Type Description objectivesarray.<string> - Inherited From:
-
<abstract, protected> _registerObjectives(objectives)
-
Register objectives on SCORM server
Parameters:
Name Type Description objectivesarray - Inherited From:
-
addConfig(config)
-
Add adapter config
Parameters:
Name Type Description configobject - Inherited From:
-
<abstract> connect()
-
Init function of adpater that connects adapter to API, if not connected.
- Inherited From:
-
destroy()
-
Destroy adapter and clean resources
- Inherited From:
-
<abstract> disconnect()
-
Disconnect adapter from server, if connected
- Inherited From:
-
<abstract> getProperty(id)
-
Get course property for current course
Parameters:
Name Type Description idstring key of property - Inherited From:
Returns:
proeprty value or null- Type
- string | null
-
<abstract> initObjectives(objectives)
-
Register objectives on server if there are none
Parameters:
Name Type Description objectivesarray objectives list - Inherited From:
- Overrides:
-
<abstract> saveProperty(id, proeprty)
-
Set course property for current course and commit to server
Parameters:
Name Type Description idstring key of property proeprtystring value - Inherited From:
Returns:
success- Type
- boolean
-
<abstract> setBookmark(site)
-
Save bookamrk
Parameters:
Name Type Description sitestring current bookamrk - Inherited From:
Returns:
success- Type
- boolean
-
<abstract> setCourseCompleted()
-
Set current course status as completed
- Inherited From:
-
<abstract> setMaxScore(score)
-
Set maximal score of the course
Parameters:
Name Type Description scorenumber maximal score - Inherited From:
-
<abstract> setMinScore(score)
-
Set minimal score of the course
Parameters:
Name Type Description scorenumber minimal score - Inherited From:
-
<abstract> setObjectiveCompleted(id, index)
-
Set objective in current course as completed
Parameters:
Name Type Description idstring objective id indexnumber objective index in objectives list - Inherited From:
Returns:
success- Type
- boolean
-
<abstract> setObjectiveIncomplete(id, index)
-
Set objective in current course as incompleted
Parameters:
Name Type Description idstring objective id indexnumber objective index in objectives list - Inherited From:
Returns:
success- Type
- boolean
-
<abstract> setScore(score)
-
Set score of the course
Parameters:
Name Type Description scorenumber current score - Inherited From: