Documentation

Feedback

Description

The Feedback module allows to give some feedback messages or hints to the user.

It is entirely controlled by using scripts. It means that it does not act automatically and it is necessary to launch a command to display a feedback message, later referred as response.

There are three categories (statuses) of responses: positive, neutral and negative. You can define arbitrary amount of responses and each of them has to belong to one of the categories mentioned above. Each response is referenced with its unique identifier.

The Contents of the response can contain anything that a regular text module can display, including images, HTML formatting, and mathematical formulas.

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
Responses List of feedback messages

Each of them has the following parameters:
  • Unique Response ID – Unique identifier that is later used to display this message
  • Status – T for True (positive) message, N for neutral message, F for False (negative) message.
  • Text – message contents
Default response Contents of default response, displayed when the module is loaded. Default response is treated as neutral
Preview response ID Used only in editor to preview responses during editing. If not empty and contains a valid Unique Response ID, the module will display the response preview referenced with that ID instead of a default one
Reset response on a page change If set to true, after a page changes, module contents will always be reset to the default response. In other case, a module state will be restored
Fade transitions If set to true, the module will apply an easy "fade in/fade out" transition effect while switching between responses
Center horizontally Indicates if contents should be centered horizontally. Note: uses absolute positioning
Center vertically Indicates if contents should be centered vertically. Note: uses absolute positioning
Is not an activity If set to true, when a presentation enters an error checking mode, the addon will not reset a response to the default one

Configuration

In order to configure a minimal implementation of the module, you have to:

  • Define at least one response by filling the “Responses” property.

Supported commands

Command name Params Description
next --- Change a displayed response to the next one (or first if the default response was displayed)
previous --- Change a displayed response to the previous one (if default response was not displayed)
setDefaultResponse --- Displays default response
change responseID Change displayed response to one with given ID
show --- Shows the addon if hidden
hide --- Hides the addon if visible
getresponseindex responseID Returns the index of response with given ID. If the addon doesn't have that ID in it's responses, then -1 is returned.

Advanced Connector integration

Each command supported by the Feedback addon can be used in the Advanced Connector addon's scripts. The below example shows how to react on Text module gap content changes (i.e. throughout putting in it elements from Source List) and change displayed response.

    EVENTSTART
    Source:Text2
    Score:1
    SCRIPTSTART
        var feedback = presenter.playerController.getModule('feedback1');
        feedback.setDefaultResponse();
    SCRIPTEND
    EVENTEND
    EVENTSTART
    Source:Text2
    Score:0
    SCRIPTSTART
        var feedback = presenter.playerController.getModule('feedback1');
        feedback.change('WRONG');
    SCRIPTEND
    EVENTEND

CSS classes

Class name Description
.feedback_container .response indicates style that apply to all responses
.feedback_container .response.visible indicates style that apply to currently visible response
.feedback_container .default_response indicates style that apply to default response
.feedback_container .neutral_response indicates style that apply to neutral responses
.feedback_container .true_response indicates style that apply to true responses
.feedback_container .false_response indicates style that apply to false responses
.feedback_container .response_inner internal container closest to the content, it is always inside one of the classes mentioned above

Examples

Display red text on false responses:

.feedback_redtext {
}

.feedback_redtext .feedback_container .false_response {
    color: #ff0000;
}

Demo presentation

Demo presentation contains examples of how to use the Feedback addon.