Documentation

MathText (WIRIS)

Description

MathText (WIRIS) is an 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 equation editor. In the WIRIS editor, it is possible to use method known as Hand - input method for writing mathematics in handwriting mode, which is provided by WIRIS. The resulting output of Hand 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 initialization time of the editor.
Correct answer MathML content that will be used as correct answer. Equations defined in this field will be validated with the user's response. Editor in this field has a built-in settings panel. For example, it allows to specify 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 property Initial text are available in SVG format and cannot be edited. Restrictions on minimum height and width are lifted. No No
editor In player, equations written in property Initial text are editable in editor. Yes No
activity In player, equations written in property Initial text are editable in editor. This type allows a user's answer to be compared and scored against the model content defined in the property Correct answer. 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 Correct answer property is not taken into account in the overall result.
Is disabled Allows disabling the module so that it won't be able to interact.
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 SVG format, like when type 'text' is chosen. A click on SVG will open the popup.
popup texts Editor where it is possible to change the name of the save and cancel button. The mentioned buttons are available in a popup.

Supported commands

Command name Params Description
show --- Shows the module.
hide --- Hides the module.
showAnswers --- Shows the module answers.
hideAnswers --- Hides the module answers.
enable --- Enables the module.
disable --- Disables the module.

Events

The MathText 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 a user clicks or touches outside 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 MathText module can be used in the Advanced Connector module scripts. The below example 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 contents of popup.
.mathtext-editor-popup-editor Class for the div wrapping editor in popup.
.mathtext-editor-popup-buttons Class for the div wrapping buttons in popup.
.mathtext-editor-popup-buttons .cancel-button Class for the cancel button in popup.
.mathtext-editor-popup-buttons .save-button Class for the save button in 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

Demo presentation

N/A