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
(→‎Moodle 2: new section)
(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...")
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Developments==
==Developments==
Documentation is a bit challenging as I am trying to bridge the possibility of moving through three different structures over the period of a year. In trying to maintain a bit of history I have users who seem intent on going to a section that says "Don't do this! For historical purposes only" (and as noted below, to avoid further confusion this material has now been deleted and appears below - and may eventually be included in a History of dragmath page),  there are some rather bizarre versioning issues resulting from changes in adminlib.php, the nature of the current install files from CVS makes simple zip install unworkable though I think preferable and it may become a core technology which means a probable total rewrite....  I have been thinking of splitting the page into "History of DragMath on Moodle", "Using Dragmath" and "Installing Dragmath" and then creating zip files for easy install and attaching them to a new forum thread and then referencing the posted files in the docs via its URL. Any comment/suggestion welcome,  either here or in the forum.
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)
 
==Discussion of Recent Changes==
This page has 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.
 
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.
 
== Moodle 2 ==
 
[[User:Marc Grober|Marc Grober]] 20:40, 16 June 2009 (UTC)   As DragMath moves towards becoming part of Moodle core there will be some dramatic changes. I have created a separate forum thread to address these developments and Petr is actively participating there so that would be the most appropriate place to address  transition questions:
http://moodle.org/mod/forum/discuss.php?d=125977&parent=551794

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)