Forums | Mahara Community

Developers /
FreeMind mind map plugin


Geoff Rowland's profile picture
Posts: 108

17 May 2011, 7:41

Mahara FreeMind mind map plugin

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

http://freemind.sourceforge.net

It draws inspiration from the FreeMind filter for Moodle.

http://docs.moodle.org/en/FreeMind_filter

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 a combination of javaScript and flash)

http://freemind.sourceforge.net/wiki/index.php/Flash_browser
http://code.google.com/p/swfobject/

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 perfomed more sluggishly than Flash and also had some issues with applet security and Mahara view permissions.

Installation

The code may be downloaded from Github

https://github.com/geoffrowland/mahara-artefact_file_blocktype_freemindflash


After unpacking the download bundle, installation essentially involves copying the /freemindflash folder (and contents) intto the /artefacts/file/blocktype folder of your Mahara installation to give /artefacts/file/blocktype/freemidflash

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  <!-- General types -->)

    <!-- FreeMind mind maps -->
    <filetype>
        <description>mm</description>
        <mimetypes>
            <mimetype>application/x-freemind</mimetype>
        </mimetypes>
    </filetype>

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

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
            require_once('file.php');
            $data->filetype = file_mime_type($um->file['tmp_name']);
        }
        else {
            $data->filetype = $um->file['type'];
        }
Add
         // The browser may have been wrong, so use file extension to force some mime-types.////
        require_once('file.php');
        switch ($um->original_filename_extension()) {
            case 'mm': $data->filetype = 'application/x-freemind';
            break;
        }

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.


Use

When editing the contents of a View, drag the FreeMindFlash icon from the Files,images and video tab into your view. Then select/upload the .mm file of your choice. You can also set the width and height, though these default to 450 px x 300 px if you don't.

If this proves of interest to folks, I'll put details on the Mahara Wiki

Enjoy

Geoff

Gregor Anželj's profile picture
Posts: 349

17 May 2011, 9:50

That was 2nd on my TODo list. Thanks for making it happen.

Will test it and send you feedback + translation into Slovenian.

Regards,
Gregor

Geoff Rowland's profile picture
Posts: 108

18 May 2011, 13:51

Gregor, I'm intrigued. What is first on your todo list?

Kristina Hoeppner's profile picture
Posts: 4729

19 May 2011, 0:54

Hi Geoff,

If I could venture a guess, it would be skins. Smile

Cheers

Kristina

Gregor Anželj's profile picture
Posts: 349

19 May 2011, 1:01

Sorry Krisitna, skins are done. My 1st thing on TODO list is finnish building support for survey system for Mahara (creating and using custom surveys/questionnaires). Cool

Regards,
Gregor

Kristina Hoeppner's profile picture
Posts: 4729

19 May 2011, 15:43

Hello Gregor.

Great that skins are finished. The survey is a great idea. Look forward to testing it.

Cheers

Kristina

anonymous profile picture
Account deleted
Posts: 3

18 May 2011, 9:19

that´s really good idea!

Conrad Lienhardt's profile picture
Posts: 127

20 June 2011, 13:34

Hello,

thanks for FreeMinde plugin. I followed your instruction, but didn't succeed in getting this plugin working. When I try to click the Files, Images and Video Tab nothing happens. The functionalty of this tab returns after disabling freemind plugin (hidden).

What's going wrong with my installation?

I'm using Mahara V 1.4

(I was unsure what is meant by "increment the $config->version number in /artefacts/file/version.php". I incremented the version number from "$config->version = 2010012702;" to "$config->version = 2010012703;"

All other Codes are placed exactly as described in your instruction.

Would appreciate your Support
Regards,
Conrad

anonymous profile picture
Account deleted
Posts: 17

21 June 2011, 21:17

Same with me. I'm using Mahara 1.4. After install it, I just see the Loading box at the top left corner. But nothing happen. I also found that it is stopping us accessing all the other blocks in the files, images and videos tab.

Any idea how to fix it?

Thank you :)

Geoff Rowland's profile picture
Posts: 108

21 June 2011, 23:56

Hi Conrad

Sorry, the plugin is not (yet) working for you. The installation is a little tricky because of the tweaks required for Mahara to recognise FreeMind .mm files, though you seem to have correctly adjusted the $config->version. Have you also visited the admin page to ensure the 'update' is applied?

It is also possible I have recently scrambled something in the code on GitHub. I have made some changes which are supposed to allow it to work in both Mahara 1.3 and 1.4. I'll test things as soon as I can, though it may take a day or two as I am currently at the Mahara UK11 conference (somewhat ironically, demonstrating the FreeMind Flash plugin).

Regards

Geoff

22 results