tool_lp/competency_rule

Description:
  • Competency rule base module.

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

Competency rule base module.

Methods

(inner) _isValid() → {Boolean}

Description:
  • Whether or not the current config is valid.

    Plugins should override this.

Source:
Returns:
Type
Boolean

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

Description:
  • Load the class.

Source:
Returns:
Type
Promise

(protected, inner) _trigger(type, data)

Description:
  • Trigger an event.

Source:
Parameters:
Name Type Description
type String

The type of event.

data Object

The data to pass to the listeners.

(protected, inner) _triggerChange()

Description:
  • Trigger the change event.

Source:

(inner) canConfig() → {Boolean}

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

Source:
Returns:
Type
Boolean

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

Description:
  • The config established by this rule.

    To override in subclasses when relevant.

Source:
Returns:
Type
String | null

(inner) getType() → {String}

Description:
  • Return the type of the module.

Source:
Returns:
Type
String

(inner) init() → {Promise}

Description:
  • The init process.

    Do not override this, instead override _load.

Source:
Returns:

Revoled when the plugin is initialised.

Type
Promise

(inner) injectTemplate() → {Promise}

Description:
  • Callback to inject the template.

Source:
Returns:

Resolved when done.

Type
Promise

(inner) on(type, handler)

Description:
  • Register an event listener.

Source:
Parameters:
Name Type Description
type String

The event type.

handler function

The event listener.

(inner) setTargetCompetency(competency)

Description:
  • Sets the current competency.

Source:
Parameters:
Name Type Description
competency Competency