tool_lp/competencyrule

Competency rule base module.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

(inner) _isValid() → {Boolean}

Source:

Whether or not the current config is valid.

Plugins should override this.

Returns:
Type
Boolean

(protected, inner) _load() → {Promise}

Source:

Load the class.

Returns:
Type
Promise

(protected, inner) _trigger(type, data)

Source:

Trigger an event.

Parameters:
Name Type Description
type String

The type of event.

data Object

The data to pass to the listeners.

(protected, inner) _triggerChange()

Source:

Trigger the change event.

(inner) canConfig() → {Boolean}

Source:

Whether or not the current competency can be configured using this rule.

Returns:
Type
Boolean

(inner) getConfig() → {String|null}

Source:

The config established by this rule.

To override in subclasses when relevant.

Returns:
Type
String | null

(inner) getType() → {String}

Source:

Return the type of the module.

Returns:
Type
String

(inner) init() → {Promise}

Source:

The init process.

Do not override this, instead override _load.

Returns:

Revoled when the plugin is initialised.

Type
Promise

(inner) injectTemplate() → {Promise}

Source:

Callback to inject the template.

Returns:

Resolved when done.

Type
Promise

(inner) on(type, handler)

Source:

Register an event listener.

Parameters:
Name Type Description
type String

The event type.

handler function

The event listener.

(inner) setTargetCompetency(competency)

Source:

Sets the current competency.

Parameters:
Name Type Description
competency Competency