Class: MangooluAdapter

adapters MangooluAdapter

Implementation of Mangoolu adapter.

new MangooluAdapter()

Implementation of Mangoolu adapter. It is responsible for live edit and text updates for Mangoolu.

Extends

Members


<readonly> bookmark

Current bookamrk
Properties:
Type Description
string
Inherited From:
Default Value:
  • ''

<readonly> completed

Indicates if course is completed
Properties:
Type Description
boolean
Inherited From:
Default Value:
  • false

<readonly> dispatcher

Dispatcher to recieve signals from adapter
Properties:
Type Description
coreutils.Signal
Inherited From:
Default Value:
  • null

<readonly> isConnected

Indicates if adapter is connected
Properties:
Type Description
boolean
Inherited From:
Default Value:
  • false

<readonly> language

Current language
Properties:
Type Description
string
Inherited From:
Default Value:
  • ''

<readonly> userID

Current user id
Properties:
Type Description
string
Inherited From:
Default Value:
  • ''

<readonly> userName

Current user name
Properties:
Type Description
string
Inherited From:
Default Value:
  • ''

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
id string
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
id string 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
objectives array.<string>
Inherited From:

<abstract, protected> _registerObjectives(objectives)

Register objectives on SCORM server
Parameters:
Name Type Description
objectives array
Inherited From:

addConfig(config)

Add adapter config
Parameters:
Name Type Description
config object
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
id string 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
objectives array objectives list
Inherited From:
Overrides:

<abstract> saveProperty(id, proeprty)

Set course property for current course and commit to server
Parameters:
Name Type Description
id string key of property
proeprty string value
Inherited From:
Returns:
success
Type
boolean

<abstract> setBookmark(site)

Save bookamrk
Parameters:
Name Type Description
site string 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
score number maximal score
Inherited From:

<abstract> setMinScore(score)

Set minimal score of the course
Parameters:
Name Type Description
score number minimal score
Inherited From:

<abstract> setObjectiveCompleted(id, index)

Set objective in current course as completed
Parameters:
Name Type Description
id string objective id
index number 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
id string objective id
index number objective index in objectives list
Inherited From:
Returns:
success
Type
boolean

<abstract> setScore(score)

Set score of the course
Parameters:
Name Type Description
score number current score
Inherited From: