Documentation

Connector

Description

The Connector is a special kind of module that combines multiple modules into fully interactive, responsive content. It reports to ValueChanged type events and executes the provided script if a received event meets specified conditions.

Properties

The list starts with the common properties, learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
Tasks List of tasks (scripts) that will be executed when specified conditions occur.
Property name Description
Source Required! Specifies the sources of event (i.e. True False module).
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 chosen")

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

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

If there are many similar tasks, it's often useful to use wildcard ('*') character. It replaces zero or more characters and can be used in the 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 chosen.")

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

Supported commands

Command name Params Description
--- --- ---

CSS classes

Class name Description
--- ---

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

Demo presentation

Demo presentation contains examples of how to use the Connector module.