Documentation
Text Selection
Description
The Text Selection module allows marking/selecting text parts as correct and wrong phrases.
You can work in two modes:
- 'Mark phrases to select', where you can mark wrong and correct answers,
- 'All selectable', where all phrases are selectable and you can mark only the correct answers.
There are two selection types:
- 'Single select', where you can select only one phrase,
- 'Multiselect', where you can select multiple phrases.
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 | Description |
---|---|
Mode | 'Mark phrases to select' or 'All selectable'. |
Selection type | 'Single select' or 'Multiselect'. |
Text | Input text. |
Enable letters selection | This property enables the user to specify single letters in a given word that are to be marked as correct or wrong. It only works in the 'Mark phrases to select' mode. |
Is Not Activity | With this option marked, the score and errors will not be returned by the module. |
Enable scroll on mobile devices | When checked, the module allows you to scroll after touching the text. |
Lang attribute | This property allows defining the language for this module (different than the language of the lesson). |
Speech texts | Sets the values of speech texts - predefined phrases providing additional context while using the module in the Text To Speech mode. Speech texts are always read using the content's default language. |
Printable | Allows to choose if the module should be included in the printout. |
Block splitting in print | If this checkbox is marked, and the "Don't randomize" or "Randomize" option is selected in the Printable property, then if the entire Text module will not fit on the printed page (Print preview), it will be moved to the next printed page. |
Configuration
Each text element must be marked with keywords \correct{} (if the word or phrase is correct) and \wrong{} (if the word or phrase is wrong).
\wrong{} is available only in 'Mark phrases to select' mode. In 'All selectable' mode you can mark only the correct phrases, and the remaining phrases are wrong.
Selection type: 'Single select' allows you to select only one word or phrase. If one phrase is selected and the student selects another one, then only the last phrase will be selected. In the 'Multiselect' selection type you can select multiple numbers of phrases.
Supported commands
Command name | Params | Description |
---|---|---|
hide | --- | Hides the module if it is visible. |
show | --- | Shows the module if it is hidden. |
isAllOK | --- | Returns true if all correct words are selected, otherwise false. |
isAttempted | --- | Returns true if a user tries to solve the module. |
AllOk Event
This event contains the following fields
Field name | Description |
---|---|
Source | module id |
Item | value: "all" |
Value | N/A |
Score | N/A |
Show Answers
This module is fully compatible with Show Answers module and displays correct answers when an adequate event is sent.
Scoring
Property | Description |
---|---|
maxScore | maximum score is equal to number of phrases marked as correct. |
score | score is equal to the number of selected correct phrases. |
errorCount | errorCount is equal to the number of selected wrong phrases. |
CSS classes
Class name | Description |
---|---|
.addon_Text_Selection .selectable | Phrases are available to be selected in the player. |
.addon_Text_Selection .selected | Phrases are selected. |
.addon_Text_Selection .wrong | A phrase marked as wrong. |
.addon_Text_Selection .correct | A phrase marked as correct. |
.addon_Text_Selection .hover | When a selectable phrase is on mouse hover. |
.addon_Text_Selection .correct-answer | A phrase marked in the show answers mode. |
Styles from the sample presentation
.addon_Text_Selection .selectable {
border-radius: 5px;
}
.addon_Text_Selection .selected {
background-color: #FAFAD2; /* yellow */
}
.addon_Text_Selection .wrong {
background-color: #FF6347; /* red */
}
.addon_Text_Selection .correct {
background-color: #7CFC00; /* green */
}
.addon_Text_Selection .hover {
background-color: orange;
cursor: pointer;
}
Demo presentation
Demo presentation contains examples of how to use the Text Selection module.