Difference between revisions of "Plugins/Artefact/FreeMindFlash"

From Mahara Wiki

< Plugins‎ | Artefact
Line 22: Line 22:
== Installation ==
== Installation ==
The latest code, which should work with Mahara 1.2, 1.3 and 1.4 may be downloaded from Github
The latest code, which should work with Mahara 1.2, 1.3, 1.4 and 1.5 may be downloaded from Github

Revision as of 20:57, 9 May 2012

Mahara FreeMind mind map plugin


This is an artefact file blocktype plugin to allow Flash rendering of interactive FreeMind mind maps in Mahara Views.

It draws inspiration from the FreeMind filter for Moodle.

Development of this Mahara version was begun by a student, James Kerrigan, on the Foundation degree in Computing and Internet Technology at the University Centre Yeovil.

It uses the FreeMind Flash browser including SWFobject to render the FreeMind files (i.e. using a combination of JavaScript and Flash)

We also have (largely) working code rendering the mind maps using the FreeMind Java applet. If there is any interest, we can make available. However, in our hands this performed more sluggishly than Flash and also had some issues with applet security and Mahara view permissions.


The latest code, which should work with Mahara 1.2, 1.3, 1.4 and 1.5 may be downloaded from Github

After unpacking the download bundle, installation essentially involves copying the /freemindflash folder (and contents) into the /artefacts/file/blocktype folder of your Mahara installation to give /artefacts/file/blocktype/freemidflash (Note: after unpacking the bundle, you may find that you have a folder labeled geoffrowland-mahara-artefact_file_blocktype_freemindflash-cc1115d. You will need to open that folder and click down through a few folders to find the freemindflash folder. It is that folder that you will need to upload to your server.)

However, a few additional edits of Mahara core files are required for appropriate handling of FreeMind .mm files.

To /artefacts/file/filetypes.xml

add (e.g. just before )


Then increment the $config->version number in /artefacts/file/version.php and visit the Site Administration page to 'force' the update the artefact_file_mime_types table (Note: to "increment the $config->version number increase your current $config->version number by one. That is, if your current number is: 202020202, make the number 202020203)

Finally, in /artefacts/file/lib.php

Immediately after

       if ($um->file['type'] == 'application/octet-stream') {
           // the browser wasn't sure, so use file_mime_type to guess
           $data->filetype = file_mime_type($um->file['tmp_name']);
       else {
           $data->filetype = $um->file['type'];


       // The browser may have been wrong, so use file extension to force some mime-types.////
       switch ($um->original_filename_extension()) {
           case 'mm': $data->filetype = 'application/x-freemind';

Note that the switch statement can be easily extended to force other mime-types (for other plugins) that are not reliably identified on upload by browsers.


When editing the contents of a View, drag the FreeMindFlash icon (below) from the Files,images and video tab into your Page (View). Then select/upload the .mm file of your choice. You can also set the width and height (default 450px x 300px).

thumb.png - from Gregor Anželj


Alternative thumb.png - from Geoff Rowland

Freemind thumb.png


If you can't upload/see FreeMind .mm files from the file-picker, then there may be problems with the file mime-type handling. Some browser/operating systems don't correctly identify .mm files as application/x-freemind during file upload. So, this has to be 'forced' in Mahara.

To do this, ensure you have applied the 'tweaks' to /artefact/file/filetypes.xml, /artefact/file/version.php and /artefact/file/lib.php detailed above.

On first adding a mind map to a View, you may get a No Flash warning. A page refresh should show the embedded interactive mind map.


  • Thorough review against Developer Area/Coding guidelines
  • The bundled SWFobject Flash/JavaScript library is duplicated in the video display libraries in Mahara. Perhaps rationalise this.