When an Atto Editor is loaded, all the tool buttons that have to be hidden in the secondary toolbar are visible. The collapse button doesn't hide/unhidde the tool icons that must be collapsed, and the MathType and ChemType icon buttons doesn't open the wiris editor.
When the user clicks on MathType or ChemType tool icons, the error Uncaught ReferenceError: WirisPlugin is not defined is logged on the console.
On moodle-atto_wiris project, we call the function _setVisibility from collapse plugin. If we move this call before the wiris core is loaded, the null reference issue will be fixed.
Behat Test
Added a Behat test atto_collapseCompatibility.feature that check the compatibility with collapse plugin. The test click on the collapse icon button from the Atto editor, then click on the MathType icon button and inserts a formula. Finally, check if the formula exist.
I added the possibility to click the collapse button using the step And I press "Collapse" in "Page content" field in Atto editor, so I had to modify the function i_press_in_field_in_atto_editor($button, $field) from moodle-filter_wiris project.
How to reproduce:
Open a Moodle 4.0 instance with wiris-moodle-docker
Log as a Teacher
Go to My courses > Test course
Click on Edit Mode switch
Click on Add activity or resource and add and Assignament
On the Atto Editor from Description parameter click on the "Collapse" icon
Click On the MathType icon
On the MathType Editor add a formula and press Insert button
Check if the formula is inserted on the Atto Editor.
Description
When an Atto Editor is loaded, all the tool buttons that have to be hidden in the secondary toolbar are visible. The collapse button doesn't hide/unhidde the tool icons that must be collapsed, and the MathType and ChemType icon buttons doesn't open the wiris editor.
When the user clicks on MathType or ChemType tool icons, the error
Uncaught ReferenceError: WirisPlugin is not defined
is logged on the console.On
moodle-atto_wiris
project, we call the function_setVisibility
from collapse plugin. If we move this call before the wiris core is loaded, the null reference issue will be fixed.Behat Test
Added a Behat test
atto_collapseCompatibility.feature
that check the compatibility with collapse plugin. The test click on the collapse icon button from the Atto editor, then click on the MathType icon button and inserts a formula. Finally, check if the formula exist.I added the possibility to click the collapse button using the step
And I press "Collapse" in "Page content" field in Atto editor
, so I had to modify the functioni_press_in_field_in_atto_editor($button, $field)
from moodle-filter_wiris project.How to reproduce:
My courses > Test course
Edit Mode
switchAdd activity or resource
and add andAssignament
#taskid 22246