Documentation

Scoreboard

Description

The Scoreboard module allows conducting a competition and scoring the points won by multiple teams. The number of teams, their names, and points can be modified in the lesson's runtime.

The Scoreboard module has two modes of working:

  • One-page mode - is turned on if the 'Variable Storage id' property is empty.
  • Multiple-page mode - is turned on if the 'Variable Storage id' property is filled and the Variable Storage is correctly configured.

Multiple-page mode configuration

To configure the Scoreboard module to work in the multiple-page mode, it is necessary to add the Variable Storage module to the 'Commons' part of the lesson (header/footer). It can be added either in the header or the footer. If the Variable Storage module was placed in the footer, it is necessary to change the default Variable Storage location and properties so that they refer to the new Variable Storage module's location correctly. By default, the values refer to the Variable Storage located in the header.

The next step is to copy the created Scoreboard module and paste it on each page where it is supposed to be used in multiple-page mode. If the configuration is correct, the Scoreboard should store values between the lesson pages in the Variable Storage module.

Multiple-page mode with IWB Toolbar integration

To integrate the Scoreboard module with the IWB Toolbar module, it is important to check the 'Has custom button' property and enter the following show() and hide() commands regarding the Scoreboard module inside the IWB Toolbar's 'On custom button selected' and 'On custom button deselected' properties.

Example 'On custom button selected' property:

Scoreboard1.show();

Example 'On custom button deselected' property:

Scoreboard1.hide();

The Scoreboard1 in the example above refers to the Scoreboard module's ID. To handle the "deselect" of the custom button when the Scoreboard is closed manually, it is necessary to add the Advanced Connector module.

Details can be found in the penultimate subsection "Advanced Connector integration". It is also recommended to hide the Scoreboard module initially, as the custom button is not selected by default.

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
Variable Storage id Default: (Variable_Storage1). ID of the Variable Storage module used for storing the Scoreboard's state in multiple-page mode.
Is draggable Default: (Checked). The checked property sets the Scoreboard drag ability on this page. When the property is unchecked the module will not be draggable on this page.
Variable Storage location Default: (header). Placement of the Variable Storage module in the lesson when multiple-page mode is supported. The choice is between the header (default) and the footer.
Variable Storage location name Default: (header). Specific name of the place where the Variable Storage module was placed. This property refers to the 'Name' property inside the header or footer.
Maximum number of teams Maximum number of teams that can be added to the Scoreboard.
Initial number of teams Initial number of teams that will be added to the Scoreboard on the module's first appearance.
Initial list of teams List of items with teams properties: Team name (name of the initial team which will be used if the new team is added), Team colour (the color of the team that is used to show the team in the module; specified in '#RRGGBB' notation).

Supported commands

Command name Params Description
hide --- Hides the module if it is visible.
show --- Shows the module if it is hidden.

Events

Scoreboard close event

When the Scoreboard module is closed, it sends the 'ValueChanged' event. It can be supported by the Advanced Connector module.

Field name Description
source module's ID
value HideScoreboard

Advanced Connector integration

The Scoreboard module's 'ValueChanged' event can be used in the Advanced Connector module's scripts. A common use case triggers the deselectCustomButton command in the IWB Toolbar module to deselect the custom button.

EVENTSTART
Source:Scoreboard1
SCRIPTSTART

var iwbToolbar = presenter.playerController.getModule('IWB_Toolbar1');
iwbToolbar.deselectCustomButton();

SCRIPTEND
EVENTEND

Demo presentation

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