Documentation

Connector

Description

Connector is a special kind of addon that combines multiple addons and modules in fully interactive, responsive exercises. It reports to ValueChanged type events and executes provided script if a received event meets specified conditions.

Properties

Property name Description
Tasks List of tasks (scripts) which will be executed when specified conditions occur
Source Required! Specifies sources of event (i. e. True/False Addon)
Item Event 'item' field value filter. Blank value means that all values are acceptable
Value Event 'value' field value filter. Blank value means that all values are acceptable
Score Event 'score' field value filter. Blank value means that all values are acceptable
Script Required! Script to be executed when incoming event meets conditions

An example task can look like this:

Property name Description
Source TrueFalse1
Item *
Value 1
Score *
Script text1.setText("Answer for True/False was choosen")

The above task will be executed for each selection (Value = 1) in the True/False addon with ID TrueFalse1 resulting in setting the Text module text "Answer for True/False was chosen".

Important: If nothing is provided for source, item, value or score, then the connector will try to match the script to execute to an empty text. This is different than using wildcard. Wildcard (*) matches to any characters and empty text matches exactly to empty text. For example a gap after deselecting may send an empty text as a value to indicate it's current state.

If there are many similar tasks, it's often useful to use wildcard ('*') character. It replaces zero and more characters and can be used in Item, Value and Score fields. An example task can look like this:

Property name Description
Source TrueFalse1
Item 1-*
Value 1
Score *
Script text1.setText("Answer for first question was choosen")

The above task will be executed when any answer will be made for question 1.

Supported commands

Command name Params Description
- - -

CSS classes

Class name Description
--- ---

Connector addon doesn't expose any CSS classes because its internal structure should not be changed (neither via Advanced Connector nor CSS styles).

Demo presentation

Demo presentation contains examples of how the Connector addon can be used.