Install Dragmath on Moodle 1.7

Install Dragmath on Moodle 1.7

by Shafie Salleh -
Number of replies: 11

Hi, we are trying to install Dragmath on Moodle version 1.7. However, we couldn't find any topics related to it. What we found so far are Installation procedures for 'moodle 1.8 or later' and 'moodle 1.9'.

Would greatly appreciate it if someone could point us to the correct installation procedure. We are using Linux Enterprise (4ES).

Average of ratings: -
In reply to Shafie Salleh

Re: Install Dragmath on Moodle 1.7

by Marc Grober -
I am not sure what to tell you. I don;t know whether major changes that would interfere with the operation of dragmath with htmlarea were made between 1.7 and 1.8. John Isner might have more detailed information.

That being said, Dragmath on its own should work just about anywhere. You could run a quick test. Download the Dragmath from the CVS 1.8, unzip it, make copies of any files to be replaced and then copy the files from the dragmath distribution to you production environment EXCLUDING adminlib.php. Do NOT copy over adminlib.php or you will render your Moodle inoperative.

Once you have done that invoke dragmath http://yourdomain/yourmoodle/lib/editor/htmlarea/plugins/DragMath/demo.html If the app comes up then move to the second stage and open your editor and report back on what you see etc.

WHile I understand that upgrading can be a daunting prospect, you may want to consider moving your Moodle forward as far as versioning ....
In reply to Shafie Salleh

Re: Install Dragmath on Moodle 1.7

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Just to follow up on what Marc has shared, I would encourage you to upgrade from Moodle 1.7 to 1.8 if possible. Do you have any reasons for not doing that upgrade? Peace - Anthony
In reply to Anthony Borrow

Re: Install Dragmath on Moodle 1.7

by Shafie Salleh -

Wish we could upgrade, but Client have some doubts about upgrades, fearing lost of data.

We tried to follow the instructions but faced a few 'iffy's. Made slight changes but it did not work out

  • dlg_ins_smile.php -- Copy this file to your $CFG->dirroot/lib/editor/htmlarea/popups directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it)
  • em.icon.smile.gif -- Copy this file to your $CFG->dirroot/lib/editor/htmlarea/images directory, overwriting the existing file (you may want to make a copy of the original file before overwriting it)

The dramath we downloaded do not have "dlg_ins_smile.php" & "em.icon.smile.gif" but have "dlg_ins_dragmath.php" & "em.icon.dragmath.gif". So we copied them over and we deleted the original "dlg_ins_smile.php" & "em.icon.smile.gif".

Next,

  • around line 275 you will see the line:
case "insertsmile: ["Insert Smiley", "em.icon.smile.gif", false, ...

Change this line to

case "insertsmile: ["Insert Equation", "em.icon.smile.gif", false, ...

 Couldn't find the line, so we did not make any changes to it.

In reply to Shafie Salleh

Re: Install Dragmath on Moodle 1.7

by Ian Wild -
Picture of Plugin developers

Hi all,

I felt I must chip in at this stage and strongly urge you to urge your clients to upgrade to 1.9.1. Applications running on the Internet really need to be bang up to date. Moodle is extremely robust, but even so, there are a number of security exploits that have been fixed since 1.7. I've had a Moodle install hacked and it wasn't nice.

It would also solve your problem regarding DragMath. I have installed it twice in the last month or so - both on 1.9.x installations without any problems (not that this is any help to your problem, I know).

Hope this helps (the bit about security, anyway),

Ian.

In reply to Ian Wild

Re: Install Dragmath on Moodle 1.7

by Shafie Salleh -

We just want to write in to thank you guys for putting aside your time to try to help us. As for upgrading, we think most of us tech guys would understand what we mean 'due to the convulated legal speak of service and maint. contracts', the limitations we face when we try to provide a service as opposed to client's business cost and downtime.

In the meantime, we'll keep trying and will post anything if it works for future reference. (wish us still full head of hair if it works smile)

We probably missing one line or two in the htmlarea.php, as we have followed the instructions almost to a 'T'...just that the 'PI' icon didnt appear on the toolbar yet

In reply to Shafie Salleh

Re: Install Dragmath on Moodle 1.7

by Shafie Salleh -

Okay, finally got it working and we used the latest dragmath too. Here are the simple steps.

1. Download the latest dragmath and unzip it at your workstation

2. Upload em.icon.dragmath to dirroot/lib/editor/htmlarea/images

3. Upload dlg_ins_dragmath.php to dirroot/lib/editor/htmlarea/popups

4. Upload the whole plugins folder and unzip to dirroot/lib/editor/htmlarea/plugins and replace the current one

5. Upload htmlarea.php to dirroot/lib/editor/htmlarea and replace the current one

We are not sure if it would apply to everyone, but for our case, with Moodle Version 1.7, it has worked. Thank you all for your kind replies.

Cheers smile

In reply to Shafie Salleh

Re: Install Dragmath on Moodle 1.7

by Marc Grober -
Just want to clarify should anyone read this thread in future....

The files Shafie references are in those respective directories in the downloaded zip, which is customarty with moodle patches. This can be confusing when instructions say to "install the files" or something similar if you don't understand the moodle structure.

You will find discussion elsewhere on this, but for these purposes suffice it to say that Moodle places all files in a zip in a parent folder (in this case it is a folder called "dragmath"), which works fine for many situations. Where it does not work so well is where you don't want the parent folder, as may the case where your moodle does not lie in a /moodle directory or in the current case, where the parent folder is named /dragmath but that folder does not correspond to any folder in the moodle file structure (or worse, has the same name as a moodle directory, but is NOT the same directory.)

I have looked at zipping dragmath so that you can simply unzip and it will place all the files where they belong, but that has to be done manually, and the files you get from the moodle download area are created automaticaly.... There was some discussion about altering that but that has not happened.

Shafie, if this discussion addresses the issue you were having, please let me know or better yet, post discussion in the Talk portion of the Dragmath documentation so we can more effectively address this.

Thanks for pursuing a solution and posting.

Marc

p.s. I really do recommend using asciimathml with dragmath. dragmath will now produce asciimathml
In reply to Ian Wild

Re: Install Dragmath on Moodle 1.7

by Shafie Salleh -

We just want to write in to thank you guys for putting aside your time to try to help us. As for upgrading, we think most of us tech guys would understand what we mean 'due to the convulated legal speak of service and maint. contracts', the limitations we face when we try to provide a service as opposed to client's business cost and downtime.

In the meantime, we'll keep trying and will post anything if it works for future reference. (wish us still full head of hair if it works smile)

We probably missing one line or two in the htmlarea.php, as we have followed the instructions almost to a 'T'...just that the 'PI' icon didnt appear on the toolbar yet

In reply to Shafie Salleh

Re: Install Dragmath on Moodle 1.7

by Marc Grober -
Shafie,

Sorry for this being out of sync, but just saw this post and have to ask from where you pulled these instructions?

These are not the instructions posted for installing the CVS version of dragmath, which is what is recommended, so I would appreciate it if you could tell me how you ended up playing with smileys instead of following the recommended install?

Thanks
In reply to Marc Grober

Re: Install Dragmath on Moodle 1.7

by Shafie Salleh -

Hi Marc,

Originally we followed the instructions (step 2) from the following link http://docs.moodle.org/en/DragMath_equation_editor. If you scroll down, you would see something like look dlg_ins_smile.php or em.icon.smile.gif

We thought of being cautious and use the '1.8version method'. So that's where things got a little 'iffy' for me. But no wories, we got it solved, and we posted it on the forum. Hehe, we probably solved it more out of sheer foolish perseverance than using our smarts.

So at the end of the day, it is possible to install the latest dragmath on Moodle version 1.7

Cheers m8 smile

Shafie

In reply to Shafie Salleh

Re: Install Dragmath on Moodle 1.7

by Marc Grober -
Actually, Shafie, I think your only problem was using the instructions that said NOT RECOMMENDED. I have changed the docs to make it more difficult for anyone to find the old instructions...... I am glad you have things working and once again recommend use of asciimathml with dragmath as an unbeatable 1-2 combination ;=}