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:

Type Description The popup option is available Is activity
text In player, equations written in the "Initial text" property are available in the SVG format and cannot be edited. Restrictions on minimum height and width are lifted. No No
editor In the player, equations written in the "Initial text" property are editable in the editor. Yes No
activity In the player, equations written in the "Initial text" property are editable in the editor. This type allows the user's answer to be compared and scored against the model content defined in the "Correct answer" property. Yes Yes

, where:
  • The popup option is available - determines whether the module supports 'popup' mode if the "Math editor in popup" property is checked.
  • Is activity - determines whether the module is an activity or not. When it is not an activity, the answer given in the "Correct answer" property is not taken into account in the overall result.
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:
  • English
  • Polish
  • French
  • Arabic
  • Spanish
Default language: English
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
  • canceled - if the editor was closed using the Cancel button.
  • saved - if the editor was closed using the Save button.
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:

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