I have created a tracker item here for the process http://tracker.moodle.org/browse/CONTRIB-1387 and will post files for testing so would appreciate QA volunteers.
As I note in the tracker, I am considering both moving the actual dragmath directory to /lib/dragmath and including asciimath in a larger zip as so many use both; comments welcome....
Consider this a release candidate....
While there is code to do language transition from Moodle to DragMath I would appreciate it if folk not doing english moodles would download the additional language files and test the functionality. Adding the language files would create a modest increase in footprint, and if there is demand I can add these files to the zip.
Dragmath is looking very good now and the current HTMLArea plugin (moodle 1.9) works almost using the same code like tinymce plugin in moodle 2.0 (modified by Petr).
In addition to actual ASCIIMathML.js (or some other modified version like my AM.js) ASCIImathML plugins and HTMLArea plugin buttons could be included to 1.9 package when we have a stable "standard" version of ASCIIMathML itself and these plugins. In my opinion the ideal way to use ASCIIMathML could allow editing of input/output values and basic settings from administration menu or some new activity so we have still a long way to go... It is also possible to modify code of tex filter to use MathML for FF if we simply don't convert tex code to images in tex filter in FF (a couple of lines using browser detection in filter.php can do this) and use asciimathml file to render tex for FF even if tex filter is enabled. That way no image fallback is needed for latexmathml type code, it can be translated by tex filter and FF simply skips TeX filter to output mathML but it does not solve the modified asciimath code problem... and we need different files for ASCIISVG, calculators etc anyway.
I had to check my old files to compare old HTMLArea plugins and I found 3 main versions:
a) the original version by Peter J. with a new integration - but the ASCIISVG plugin should be rewritten to work like tinymce plugin
b) the "modified version" of dlg_ins_dragmath.php that was the pre-version of SEE tests and had dragmath, Enrique's unicode picker & some code from http://www.codecogs.com/components/equationeditor/equationeditor.php - could be modified to use yui tabs or tabs of tinymce... Anyway, htmlarea and tinymce could use similar plugins so that upgrading from moodle 1.9 to moodle 2.0 would be easier and therefore this could be in another "package"
c) the tinymce inside htmlarea version where htmlarea allowed you to use tinymce and any plugins of tinymce inside a special dialog - "editor inside editor" version - a little heavy, I prefer totally removing HTMLArea and replacing it with tinymce and that will happen anyway in moodle 2.0... the reason why I started to play with moodle 2 an stopped testing HTMLArea code months ago... if I just had time to do everything I want but you know my situation with "family life, gardening etc and my hobbies..."
Moodle 2.0 is getting better every day and it may not take many years anymore to get it "stable for production sites". I am sure that we will have stable plugins for asciimathml and other types of math plugins for tinymce ready as well when we see that final release of moodle 2.0.
It appears to work but I would appreciate it if I could get some testing on the package to make sure there are no issues with various platforms, languages, etc.
Works fine on my test sites too...
INSTALLATION STEPS FOLLOWED:
- I removed the previous DragMath files that were in
- I unzipped the .zip file in /moodle/web (this is the root for moodle in fedora). I just accepted all the files overwriting (I had previously made backup),
- the only modification I did to the lib/adminlib.php file is to add the lines
'insertdragmath' => 'em.icon.dragmath.gif',below the line
'insertsmile' => 'em.icon.smile.gif',as explained in the DragMath equation editor page. This site is only for math so I don't need to hide the dragmath button.
- I use Fedora 10, moodle 1.9.4 (january 28 build) and it is a P4 at home with a D-link gateway - so it is a bit slow.
- the tests were done on a window XP.
- the insert did not work at the beginning - FF and Netscape hang on me twice and gave me a
Error: opener has no properties
Source File: http://***/moodle/lib/editor/htmlarea/popus/popup.js
This may be because of the prior installation of the version 7.2. When I tested Explorer 8.0 they all started to work.
- I've tested FF 2.0, Netscape 9.0, Explorer 8.0 they all work fine,
- Safari does not show the editor at all - so I will check the preference, and I don't have Opera.
- No error on the apache log file,
- I got some warnings about the htmlarea.css in FF error console (filter, moz-opacity, FiedFace but this has nothing to do with DragMath - I need to upgrade FF)
- I guess that when moodle get upgraded I will need to reinstall. Moodle is one of Fedora package and from time to time it get upgraded. It would be nice to have DragMath integrated with moodle.
I am not sure about the error message you received as the directory would more likely be popups..... but I am glad all is working and folk are working hard on integrating dragmath into Moodle 2, and Mauno is also developing SEE, which you can test out on his demo site.
I will update the moodle dragmath docs in the next day or so. I apparently also need to add some warnings about using winrar so that users do not end up installing the zip into a new directory using the archive name
depending on how you upgrade there are only a few files that need to be replaced (if you explore the zip you will see that the dragmath files themselves are self contained at /lib/dragmath and should not be impacted at all. The new adminlib.php will need to be edited (do not copy an old adminlib.php back over a new adminlib.php after an upgrade!) There are three other files: the dlg_ins_dragmath.php should not be overwritten by an upgrade to 1.9.x, while htmlarea.php and dialog.js will be.
Please see http://docs.moodle.org/en/DragMath_equation_editor for documentation (I will be updating the documentation over the next couple of days.)
I ran into a dead end when installing v7.8.1, perhaps because the documentation hasn't been updated yet. In any case, I uploaded the .zip to my moodle root, unarchived, and modified the adminlib.php file. The icon did not appear in the HTML editor. When I checked the Appearance > HTML Editor settings, the DragMath icon was there and unchecked, meaning it should have appeared. Running moodle 1.9.5.
It would also be nice to have a way to know what files are places where, so that in the event that DragMath needs to be uninstalled, the appropriate files can be found.
Usually missing button in editor is caused by cache - you can see it also if you make changes to files of your theme and don't refresh your browser (or clean cache or file history of your browser). In htmlarea cache lifetime is 1800 seconds = 30 minutes, for files of theme it is 10 minutes in moodle 1.9 and 30 minutes in moodle 2.0. So if you have used your editor just before making changes you will need to refresh browser after changes to see the effect.
Sometimes people unzip files to wrong folder (sub folder or parent folder) or files may have wrong permissions - a simple filemap /file tree or list of version changes in readme file could be useful. I usually test files first in a local PC (Windows package of moodle / Windows Vista) and compare the files and folders with Winmerge http://winmerge.org/about/screenshots/ - possible errors can be usually found from server (apache) error log or for example FF error console or in IE8 with developer tools...or by setting debugging to ALL from administration menu of moodle if the reason is in moodle itself. If local install looks ok I usually upload the files to my Debian Lenny test server and check again possible errors on linux environment.
It should not matter if you leave the old files uninstalled because new files are using new paths - unless your browser is still using the old files from cache and finds them...