Documentation
MathText (WIRIS)
Description
MathText (WIRIS) is a module that allows the use of MathType for Office Tools packages and WirisQuizzes.
With MathType for Office Tools packages, it is possible to create or edit mathematical equations using a special WYSIWYG formula editor, also known as the equation editor. In the WIRIS editor, you can use the handwriting mode, which WIRIS provides. The resulting output of the 'Hand' mode is the equivalent presentation MathML of the formula handwritten by the user. Depending on the type selected in the module's settings, math equations in the player can be edited or available only in SVG form.
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 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Initial text | The initial MathML content of the editor. Used to set the content at the initialization time of the editor. | ||||||||||||||||
| Correct answer | MathML content that will be used as the correct answer. Equations defined in this field will be validated with the user's response. The editor in this field has a built-in settings panel. For example, it allows specifying error tolerance on a user's response. | ||||||||||||||||
| Type |
Table with available types and their descriptions:
, where:
|
||||||||||||||||
| Is disabled | Allows disabling the module so that the user is not able to interact with it. | ||||||||||||||||
| Language | Language of the editor. List of supported languages:
|
||||||||||||||||
| Formula color | Defines the color of the whole formula. A color with the form #RGB or #RRGGBB. Default: #000000 (black) |
||||||||||||||||
| Background color | Defines the background color of the whole formula. A color with the form #RRGGBB. Default: #FFFFFF (white) |
||||||||||||||||
| Math editor in popup | Determines whether the editor is opened in a popup. The editor in the basic view is replaced by the content from the editor saved in the SVG format, like when the 'text' type is chosen. A click on the SVG will open the popup. | ||||||||||||||||
| popup texts | Editor where it is possible to change the names of the save and cancel buttons. The mentioned buttons are available in a popup. |
Supported commands
| Command name | Params | Description |
|---|---|---|
| hide | --- | Hides the module if it is visible. |
| show | --- | Shows the module if it is hidden. |
| showAnswers | --- | Shows the module's answers. |
| hideAnswers | --- | Hides the module's answers. |
| enable | --- | Enables the module. |
| disable | --- | Disables the module. |
Events
The MathText (WIRIS) module sends different ValueChanged events depending on its configuration.
Scenario 1: Inline Editor
This scenario applies when the module is configured with an inline editor, which means:
- The "Type" property is set to 'editor' or 'activity'.
- The "Math editor in popup" property is deselected.
In this case, the module dispatches a blur event after the user clicks or touches outside of the WIRIS editor area.
| Field name | Description |
|---|---|
| Item | blur |
| Value | 1 |
| Score | 1 if the module has a correct answer; 0 otherwise. The score is always 0 if the "Type" property is not set to 'activity'. |
Scenario 2: Popup Editor
This scenario applies when the module is configured to use a popup editor, which means:
- The "Type" property is set to 'editor' or 'activity'.
- The "Math editor in popup" property is selected.
In this case, the module dispatches an event when the popup editor is closed.
| Field name | Description |
|---|---|
| Item |
|
| Value | 1 |
| Score | 1 if the module has a correct answer; 0 otherwise. The score is always 0 if the "Type" property is not set to 'activity'. |
Advanced Connector integration
Each command supported by the MathText module can be used in the Advanced Connector module's scripts. The example below shows how to show or hide the module according to the Double State Button module's state.
EVENTSTART
Source:DoubleStateButton1
Value:1
SCRIPTSTART
var module = presenter.playerController.getModule('MathText1');
module.show();
SCRIPTEND
EVENTEND
EVENTSTART
Source:DoubleStateButton1
Value:0
SCRIPTSTART
var module = presenter.playerController.getModule('MathText1');
module.hide();
SCRIPTEND
EVENTEND
CSS classes
| Class name | Description |
|---|---|
| .mathtext-editor-wrapper | Class for the div wrapping module editor or div wrapping SVG. |
| .mathtext-editor-wrapper .wrong | Class for the module solved incorrectly. |
| .mathtext-editor-wrapper .correct | Class for the module solved correctly. |
| .mathtext-editor-popup-wrapper | Class for the div wrapping the contents of the popup. |
| .mathtext-editor-popup-editor | Class for the div wrapping the editor in the popup. |
| .mathtext-editor-popup-buttons | Class for the div wrapping buttons in the popup. |
| .mathtext-editor-popup-buttons .cancel-button | Class for the cancel button in the popup. |
| .mathtext-editor-popup-buttons .save-button | Class for the save button in the popup. |
Documentation for editor
The player uses WIRIS Quizzes version 3.77.2.
The following WIRIS documentation was used to provide documentation in the editor:
- https://docs.wiris.com/quizzes/en/getting-started/wirisquizzes-user-interface.html
- https://www.wiris.net/demo/quizzes/assertions.xml
| Correct answer | |
|---|---|
| Input method | Documentation |
| Validation | |
| Allowed input | Documentation |
| General input options | Documentation |
| Quantity input options | Documentation |
| Comparison with student answer | Documentation |
| Additional properties | Documentation |