flowchart

Filters ::: filter_flowchart
Maintained by Сергей Роганов
Render svg flowcharts using flowcharts.js by Adriano Raiano (http://adrai.github.io/flowchart.js, MIT license), which use raphael.js (MIT licence either)
Latest release:
14 sites
6 downloads
13 fans
Current versions available: 1

Flowchart Moodle Filter

LMS Moodle filter to render/display flowcharts It uses flowchart.js by Adriano Raiano (http://adrai.github.io/flowchart.js, MIT license) that uses Raphaël js (http://raphaeljs.com, MIT license)

Using

common syntax is laTeX like:

\flowChart[<options>]{<content>}

example:

\flowChart[inline, yes-text:yup, line-width: 2]{st=>start: start
in=>inputoutput: x,y
op=>operation: z=x+y
ou=>inputoutput: z
en=>end: end
st->in->op->ou->en}

Syntax

Syntax of content of the command see in flowchart.js project (http://adrai.github.io/flowchart.js/).

There could be any options in the command. Name them like options from example on the flowchart.js project page to make effect. Both :and = could be name-value separator.

There are four extra options:

  • background-color : <html/css color>
  • align : <html/css align>
  • vertical-align : <html/css vertical-align> // will effect onli for inline flowchart
  • display : <css display prperty>

Last three are not nessessery for manual operating. Background-color will affect div container. Displaying inline could be set up via singleinline.

Installation

as zip

manually

  • clone this repo
  • name the folder by filter name (flowchart)
  • copy this folder into moodle's filter folder on server

How it works

It parses text to find all commands. Actually, standart php part of filter changes command to proper for js wrapper first. Then php part passes filter options from admin page. Plugs in to page nessessery js's. And runs main function from wrapper.

Wrapper finds all commands and parse them splitting options and content. Both are parses too. Places of commands appearing replaces with div container with proper settings. And then it calls flowchart.js function to add svg flowchart to given container with parsed text and locally override options.

Todo:

  • more standart options to settings

Screenshots

Screenshot #0

Contributors

Сергей Роганов (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Сергей Роганов
    Thu, 9 Apr 2015, 8:21 PM
    If plugin is useful, please feedback even if there is no troubles with it, for statistics.
Please login to post comments