Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: FreeMind filter.

FreeMind filter

From MoodleDocs
Revision as of 17:07, 30 August 2007 by John Isner (talk | contribs)

Introduction

This filter allows Moodle to display "mind maps" (a kind of graphic organizer) created by the open source program FreeMind. After creating the mind map on your Windows desktop, save it to your hard drive. Then upload the file to your course. To display the mind map anywhere in your course (e.g., in a Lesson or a Web page resource), just link to the file at the point where you want the mind map to appear. The filter searches for links to files with the .mm suffix and replaces them by an embedded applet. The applet displays the mind map and allows users to interact with it. For example, users can collapse and expand nodes (users cannot change the structure).

The FreeMind filter has no version dependencies. It should run with any version of Moodle and any browser with the Java plugin.

Installing the filter

You install the FreeMind filter in two steps

  1. install the FreeMind package
  2. install the FreeMind filter

TBD changeme

  • create a new directory $CFG->dirroot/filters/freemind
  • upload freemind.zip to the directory and unzip it there
  • activate the filter (Site Administration -> Modules -> Filters)

freemind.zip contains four items

  • filter.php -- the filter code
  • freemindbrowser.jar -- the Java applet
  • my_novel.mm -- a sample mind map created by FreeMind
  • README -- basically repeats everything I'm saying here.

How the filter works

The filter searches for links to files with the '.mm' suffix and replaces them by an applet that displays the mind map. It replaces everything from the opening tag <a> to the closing tag </a>, inclusive.

  • Any text before the <a> will be placed above the applet
  • Any text following </a> will be placed below the applet
  • Any text between the tags will be discarded

For example, suppose the original text looks like this: Here's the outline of my novel <a href=...>Hahaha</a>How do you like it? After filtering, the text will look like this:

Here's the outline of my novel<br/> <applet> .... </applet><br/>How do you like?

and will display like this:

Here's the outline of my novel http://www.scholarandkatz.com/training/file.php/1/freemind_-_my_novel_tiny_version.png How do you like it?

Adjusting the size of the display

By default, the applet's height and width are 100% of its parent element (the element in which the applet is embedded). As a result, one way of controlling the size of the mind map is by controlling the size of the parent element. A table cell in a 1 x 1 table can be used, but you must be sure to set the cell height and width properties to 100%. These properties can only be set through the Cell properties dialog, which is accessed from the Table toolbar of the Enlarged HTML editor.

Alternatively, you can specify the applet's size in pixels by appending a 'height' and/or 'width' parameter to the right of the file location. For example, to make a mindmap 300 pixels wide and 450 pixels high, type the following into the Location box when creating the link: http://mysite/file.php/2/my_novel.mm width=300 height=450 The parameters may be written in any order, but must follow the URL.

The only disadvantage of using the height and width parameters is that you can only change them by toggling into html mode in the editor.

Interacting with the applet

The mind map displayed by the applet is dynamic. Left click on a node and it will fold. Left click again and it will open. Left click and drag to move the map. Right click in a node, branch, or on the canvas for an appropriate context menu. Read the FreeMind applet FAQ to find out what else you can do. One thing you cannot do is modify the underlying structure of the map. That can only be done in the FreeMind desktop application.