Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: DragMath equation editor.

Talk:DragMath equation editor: Difference between revisions

From MoodleDocs
(Add old install method to allow deletiong from article)
(Replaced content with "==Developments== After reviewing the documentation on this page, I have deleted it as irrelevant to Moodle 2. The issue for me was simple, as DragMath is now core, then it no...")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page is being overhauled based on the change in how the applet and integration is being packaged and offered as well as upon the changes in  DragMath 0.7.2 that move parsing tokens to the <Initial> stanza of the MoodleTex.xml format.
==Developments==
 
After reviewing the documentation on this page, I have deleted it as irrelevant to Moodle 2. The issue for me was simple, as DragMath is now core, then it no longer needed discussion on installation. Any other instruction in there, based on that idea, was also irrelevant. Sorry if this seems an arbitrary decision on my part, but if you go to the [https://docs.moodle.org/19/en/DragMath_equation_editor|Dragmath equation editor] page in v1.9 Docs, the text is still there.--[[User:Colin Fraser|Colin Fraser]] 04:18, 18 September 2011 (WST)
Prior instructions for installing dragmath appear below and have been removed from the docs because users continue to use them though they are warned NOT to.  This way there will be some record of the docs,  but users will have to aggressively look for trouble.....
 
====Installing DragMath Integration and DragMath Applet Separately - Not Recommended!====
 
You install DragMath in two steps
#Install the DragMath package
#Install the DragMath integration package
 
'''=====Step 1 - Install the DragMath package ====='''
 
Download the latest DragMath package from [http://sourceforge.net/projects/dragmath sourceforge] and unzip it in the <code>$CFG->dirroot/lib/editor/htmlarea/popups</code> directory (where <code>$CFG->dirroot</code> is your "moodle" directory as defined in <code>config.php</code>. NOTE there is also a <code>popups</code> directory directly in the editor directory. Don't use that one!).  This will create a new directory under <code>popups</code> called <code>DragMath</code> containing all the necessary DragMath components.
 
'''=====Step 2 - Install the DragMath integration package ====='''
 
'''Important Note:''' These instructions will REPLACE the smiley button on the HTML editor toolbar with the DragMath editor button. This was done to keep the installation instructions simple.  If you want to keep your smiley button, see the section at the end of this article.
 
Download the latest DragMath integration package from the [http://moodle.org/mod/data/view.php?id=6009 modules and plugins database].  In the zip archive, you will find two files.
* <code>dlg_ins_smile.php</code>  -- Copy this file to your <code>$CFG->dirroot/lib/editor/htmlarea/popups</code> directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it)
* <code>em.icon.smile.gif</code> -- Copy this file to your <code>$CFG->dirroot/lib/editor/htmlarea/images</code> directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it)
 
You must also change two lines in the file <code>$CFG->dirroot/lib/editor/htmlarea/dialog.js</code>
* around line 34 you will see the line:
: <code>case "dlg_ins_smile": x = 330; y = 320; break;</code>
Change this line to
: <code>case "dlg_ins_smile": x = 540; y = 340; break;</code>
* around line 47, you will see a line that begins
: <code>var dlg = window.open(url, "ha_dialog", "toolbar=no, menubar=no, ...</code>
Modify this line, changing
: <code>resizable=no</code>
to
: <code>resizable=yes</code>
 
You might also want to change the mouse over popup from "Insert Smiley" to "Insert Equation".  to do this you need to edit the file
<code>$CFG->dirroot/lib/editor/htmlarea/htmlarea.php </code>
* around line 275 you will see the line:
: <code>case "insertsmile: ["Insert Smiley", "em.icon.smile.gif", false, ...</code>
Change this line to
: <code>case "insertsmile: ["Insert Equation", "em.icon.smile.gif", false, ...</code>
 
Finally, make sure that the new files and directories you create in the above steps are readable by the Web server. For example, make sure that the em.icon.smile.gif file has the same permissions as other gif files in the images directory.
 
'''=====Step 3 - Additional configuration regarding smiley button...====='''
 
For those users who want to keep their smiley button, there are postings in  [http://moodle.org/mod/forum/discuss.php?d=78683 this discussion] that explain how to do it.  At one time you could also download a special version of the DragMath integration package [http://educity.hk/dragmath.zip here] but we are informed that this link is no longer working (you may be able to search for the link in the forums and find the name of the poster). Unzip it in your moodle root directory.

Latest revision as of 20:18, 17 September 2011

Developments

After reviewing the documentation on this page, I have deleted it as irrelevant to Moodle 2. The issue for me was simple, as DragMath is now core, then it no longer needed discussion on installation. Any other instruction in there, based on that idea, was also irrelevant. Sorry if this seems an arbitrary decision on my part, but if you go to the equation editor page in v1.9 Docs, the text is still there.--Colin Fraser 04:18, 18 September 2011 (WST)