This addon allows users to add selectable lines to the presentation. This can be used either as an activity or a simulation.
|Is visible||Enables to hide or show the module.|
|Lines||Here you define the coordinates of the lines' ending points and decide if the line should be selected or not.
It's a new line separated property. Each single line should contain x, y values of both points as well as 0 if a line should not be selected or 1 if it should.
|Is activity||Enables to define whether the module is an activity or not.|
|Is disabled||Allows to disable the module so that it won't be possible to select any line.|
|Single Mode||If checked, only one line can be selected at a time. Otherwise, user can select many lines.|
The Line Selection Addon sends the ValueChanged type events to Event Bus when a line is selected or deselected.
|Item||Id of the line (lines are numbers as they are put in the Lines property)|
|Value||1 for selection, 0 for deselection|
|Score||1 for correct answer, 0 for wrong|
When a user selects all lines properly without any error, the addon sends the 'ALL OK' event.
|show||---||Shows the addon.|
|hide||---||Hides the addon.|
|reset||---||Resets the addon.|
|enable||---||Enables the addon.|
|disable||---||Disables the addon.|
|isAllOK||---||Returns true if all lines are made correctly and there are no mistakes, otherwise false.|
|select||index||Selects the line with a given index.|
|deselect||index||Delects the line with a given index.|
The Line Selection Addon allows you to create exercises. To set the module in an excercise mode, choose the 'Is activity' property. If the addon is not in an excercise mode, all of the below methods return 0!
|maxScore||The sum of all lines that should be selected.|
|score||The sum of all selected lines that have 1 at the end of their definition in the Lines property.|
|errorCount||The sum of all selected lines that have 0 at the end of their ddefinition in the Lines property.|
This module is fully compatible with the Show Answers module and displays correct answers when a relevant event is sent.
|.lines_selection||DIV containing the whole addon|
|.lines_wrapper||SVG containting the lines|
|.disabled||Additional class for lines-selection for disabled addon|
|.lines_wrapper .line||Indicates the look of the line.|
|Additional class for the line. Indicates the look of the selected line.|
|Additional class for the line. Indicates the look of the correctly selected line in the error checking mode.|
|Additional class for the line. Indicates the look of the incorrectly selected line in the error checking mode.|
|Additional class for the line. Indicates the look of the line that should be selected in the Show Answers mode.|
Demo presentation contains examples of how to use the Line Selection addon.