Documentation

TrueFalse

Description

The True False module is an alternative to the Choice module. It allows putting a single or multiple-choice activity in the presentation.

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
Is not an activity With this option, the selected score and errors will not be returned by the module.
Multi Indicates whether the activity is in a multiple or single-choice mode. For a single-choice activity, it is enough to leave the box unchecked.
Questions Questions list. Here you can insert your questions and answers.
Property name Description
Question Single question.
Answer This is a number. It is the index of the correct answer. i.e. in case of 3 possible choices A, B, C "1" indicates the first choice (A), "2" the second (B), and so on (always counted from left to right). For instance, if "C" is the correct answer, "3" is the number that should be inserted in the "Answer" field. In case of a multiple-choice mode, the indexes should be comma separated.
Choices Choice options list. i.e. "True" and "False" as possible choices.
Lang attribute This property allows defining the language for this module (different than the language of the lesson).
Speech texts List of speech texts: Selected, Deselected, Correct, Incorrect. This text will be read by the Text to Speech module after the user performs a certain action.
Is disabled Allows disabling the module so that the user is not able to interact with it.
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.

Supported commands

Command name Params Description
isAllOK --- Returns "true" if all answers are selected correctly and there are no mistakes, otherwise "false".
isAttempted --- Returns "true" if any answer to any question is selected.
reset --- Resets the module.
show --- Shows the module if it is hidden.
hide --- Hides the module if it is visible.

Custom Scoring

The True False module supports the Custom Scoring module. For more information about Custom Scoring see documentation.

Command name Params Description
isSelected questionIndex - index of a row.
answerIndex - index of an answer.
Returns "true" if an answer is selected, otherwise "false".
markAsCorrect questionIndex - index of a row.
answerIndex - index of an answer.
Marks the answer as correct.
markAsWrong questionIndex - index of a row.
answerIndex - index of an answer.
Marks the answer as wrong.
markAsEmpty questionIndex - index of a row.
answerIndex - index of an answer.
Marks the answer as empty.
removeMark questionIndex - index of a row.
answerIndex - index of an answer.
Removes the answer's mark.

Events

The True False module sends events to the Event Bus when the user selects an option. If the answer has already been selected and the question has only one answer possible ("Multi" property deselected), then the event is not sent.

Field name Description
Item <Question_number>-<Answer_number> (i.e. 2-3 means that the 3rd answer has been (de)selected for the 2nd question.)
Value 1 for selection, 0 for deselection.
Score 1 for correct answer, 0 for wrong.

When the user selects all answers properly without any error, the module sends the 'ALL OK' event. This event is different from the normal True False event and its structure is shown below.

Field name Description
Item all
Value N/A
Score N/A

The second event which is different from others is the 'ROW OK' event. This event is sent when all answers in a single row are correct.

Field name Description
Item <row_number>-all (i.e. 2-all means that all answers were correct for the 2nd row.)
Value N/A
Score N/A

Show Answers

This module is fully compatible with the Show Answers module and displays correct answers when an adequate event is sent.

CSS classes

Class name Description
.addon_TrueFalse .tf_radio, .tf_checkbox Indicates the look of the table.
.addon_TrueFalse .tf_radio_text, .tf_checkbox_text Indicates the look of the table cell containing the choice icon.
.addon_TrueFalse .tf_radio_image, .tf_checkbox_image Indicates the look of the table cell containing the single/multi-choice icon. Icons are inner DIV elements with the 'background-image' property pointing to the icons' URL addresses.
.addon_TrueFalse .tf_radio_image.last, .tf_checkbox_image.last Indicates the look of the last table cell containing the single/multi-choice icon.
.addon_TrueFalse .tf_radio_question, .tf_checkbox_question Indicates the look of the table cell containing a question.
.addon_TrueFalse .up Standard state of the choice icon.
.addon_TrueFalse .up.disabled State when the choice icon isn't selected and check answers is pressed.
.addon_TrueFalse .down State when the choice icon is selected.
.addon_TrueFalse .down.wrong State when the choice icon is selected, and it is a wrong answer.
.addon_TrueFalse .down.correct State when the choice icon is selected, and it is a correct answer.
.addon_TrueFalse .down.correct-answer State when correct answers are displayed after the ShowAnswers event was sent.
.addon_TrueFalse .mouse-hover State of the choice icon on mouse hover.

Demo presentation

Demo presentation showing how to use the True False module.