Tiny Algorithm: Flowchart Editor
Draw algorithms as flowcharts right in the Moodle text editor, run them step by step and turn them into code.
Live demo: try the plugin on algorithm.tsp.edu.rs. Log in as a guest, or use the demo accounts teacher and student (password Demo-2026). Everything is reset every night.
What's New in v2.4.3
- Accessibility: no axe violations in the viewer, the editor, its dialogs and quiz questions; the diagram can be scrolled from the keyboard.
- Default code language: the language the teacher chooses in the editor is the one readers see first.
- Wide editor: in full screen the code has its own column right of the diagram; menus are never cut off.
- From 2.4.0, debugging: breakpoints, Continue, a status, the call stack above the variables, and the block and code lines of an error in red.
- Trace table: one row per step with the values after it, to copy or download as CSV.
- Break and Continue: new blocks, drawn with a dashed line to where they go; blocks that never run are faded.
- Eleven languages and pseudo-code: Visual Basic .NET, Go, Rust and Kotlin are new; pseudo-code uses the words of the user's language and is the text description under every diagram.
- Comments on blocks: shown as tooltips and written above the block's code.
- The code and the diagram point to each other: click a line of the code to select its block, click a block to mark its lines.
- Safer runs: limits for recursion and output, typed input asked again when it does not fit, Random that gives the same numbers in every test.
- Function tests with arrays and matrices, and Flowgorithm files that keep the return value of functions.
Core features
- Visual editor: Declare, Assign, Input, Output, If, For, While, Do...While, Break, Continue, Call, Return, Comment; several functions, undo / redo.
- Drag, copy and paste: drag a block onto a + sign with the mouse or a finger; Ctrl + C, X, V and D copy, cut, paste and duplicate blocks, also between diagrams.
- Arrays and matrices: m[i, j] in the interpreter, the variable watch and the code in every language.
- Save as SVG or PNG: the whole diagram as a picture for handouts and slides.
- Interpreter: Run / Step / Stop, console with input, variable watch, infinite-loop guard and clear error messages; the current block and the branch each condition takes are marked.
- Arrows: every connection that enters a block, goes back to a loop condition or joins another line ends in an arrow.
- Flowgorithm files: import and export real
.fprg files.
- Code generation: pseudo-code and Python, C, C++, Java, C#, JavaScript, Pascal, Visual Basic .NET, Go, Rust and Kotlin.
- Editable images: the diagram is an SVG image that keeps its model; double-click to edit again. Zoom and per-diagram options included.
- Students edit and test: with filter_algorithm, students can change their own copy of a diagram in any content and run the teacher's tests.
- Tests from the solution: the teacher enters only the inputs; the expected outputs are computed from the teacher's solution. A test can also call one function and check the value it returns.
The algorithm plugins
Requirements
- Moodle: 4.5 LTS to 5.3 (PHP as required by your Moodle version).
- Companion plugins (optional): filter_algorithm 2.2.0 (Run / Step and the student features for readers) and qtype_algorithm 2.4.1 (quiz question type with automatic grading).
Privacy
The editor and interpreter run in the browser; nothing is sent to external services. The diagram is stored in the text you save. The plugin keeps two display preferences (code and variable panels) and the student's own copy of an editable diagram in the browser's local storage and implements the Moodle Privacy API (no personal data stored).
Developed by Boban Blagojević. Languages: English and Serbian (Latin and Cyrillic).
Source, documentation and issue tracker:
github.com/blagojevicboban/moodle-tiny_algorithm
Licensed under the GNU GPL v3 or later.