error in Atto's equation editor (matrix)

error in Atto's equation editor (matrix)

by Przemyslaw Stencel -
Number of replies: 4

Hi all,

There seems to be an error in Atto's equation editor - the advanced tab contains a button which is supposed to enter a matrix:


However, the button (and the Tex code inserted) is missing one backslash, and as a result - is not displaying the matrix correctly. The code should be:


I looked through the equation editor's files and found a place which seems to hold the buttons - in the /lib/editor/atto/plugins/equation/settings.php file:


However, as you can see, the Tex code in that file is correct surprise  But the code entered via the button is not.  thoughtful 

Moreover, when I tried to edit the /lib/editor/atto/plugins/equation/settings.php file, my changes were not reflected in the editor (purging caches did not help). Is there another place I should edit?

Average of ratings: -
In reply to Przemyslaw Stencel

Re: error in Atto's equation editor (matrix)

by Geoffrey Rowland -
Picture of Plugin developers

Hi Przemyslaw

This is an annoying and long standing issue:

MDL-45067

MDL-50935

The problem is that \ is treated as an escape character by PHP. So to display \\ in TeX you need \\\\ in settings.php.


If you make a lot of use of matrices in Moodle, you may find this plugin useful:

https://moodle.org/plugins/atto_matrix


Average of ratings: Useful (1)
In reply to Geoffrey Rowland

Re: error in Atto's equation editor (matrix)

by Przemyslaw Stencel -

Thank you, Geoffrey,

However, even when I made the change in settings.php (introduced 4 backslashes instead of 2), the editor still shows the wrong matrix. I have purged all caches (/admin/purgecaches.php) but there's no effect. Is there anything else I need to do?

In reply to Przemyslaw Stencel

Re: error in Atto's equation editor (matrix)

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

The value in settings.php is a default value that is used to load the admin settings when the plugin is first installed. If the default setting is already loaded, then you need to change it in the settings for the Atto on the site.

Average of ratings: Useful (1)