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 to as a response.

Responses have three categories (statuses): positive, neutral, and negative. You can define an arbitrary number of responses and each of them must 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 the Neutral message, F for the False (negative) message.
  • Text – message contents.
Default response Contents of default response, displayed when the module is loaded. The default response is treated as neutral.
Preview response ID Used only in the editor to preview responses during editing. If it is 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 page change If set to true, after changing the page, the module's contents will always be reset to the default response. In other cases, the module's 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 module will not reset its response to the default one.
Mute If this option is selected, the content of the feedback is not automatically read in the Dedicated screen reader mode when a command is used to change the feedback response.
Lang attribute This property allows defining the language for this module (different than the language of the lesson).
Speech Texts List of speech texts: Correct answer, Incorrect answer, No feedback message. This text will be read by the Text to Speech module after the user performs an action.

Configuration

To configure the minimal implementation of the module, you have to:

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

Supported commands

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

Advanced Connector integration

Each command supported by the Feedback module can be used in the Advanced Connector module's scripts. The example below shows how to react to the Text module's gap content changes (i.e. when putting in it an element from the Source List) and change the 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 the style that applies to all responses
.feedback_container .response.visible indicates the style that applies to currently visible response
.feedback_container .default_response indicates the style that applies to default response
.feedback_container .neutral_response indicates the style that applies to neutral responses
.feedback_container .true_response indicates the style that applies to true responses
.feedback_container .false_response indicates the style that applies 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 module.