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.23.0
- Translations: German, French, Spanish, Italian, Portuguese, Polish, Croatian, Bosnian, Slovenian, Macedonian, Slovak and Czech.
- TypeScript and PHP: two new code languages, typed TypeScript and PHP 8.
- Records: types such as Student with the fields name and avg; s.name, arrays of records a[i].avg, records as copies, in every language.
- Call tree: every call of a function drawn as a tree; repeated calls amber. Recursion templates.
- Continue on another device (with filter_algorithm): the newer copy of an exercise wins.
- AI hints (optional): why the algorithm stopped, what to check when a test fails; never the solution.
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; Ctrl + C, X, V and D copy, cut, paste and duplicate blocks.
- Arrays and matrices: m[i, j] in the interpreter, the variable watch and the code in every language.
- Save as SVG or PNG: the diagram as a picture.
- 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.
- Flowgorithm files: import and export real
.fprg files.
- Code generation: pseudo-code and Python, C, C++, Java, C#, JavaScript, TypeScript, PHP, 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.
- 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.
- Class work: with filter_algorithm the teacher sees the students' copies of an exercise as small diagrams with their test results, and shows one large on the projector.
- Parsons problems: with qtype_algorithm a question gives the blocks of the solution in random order, with a few wrong ones, to arrange and nest.
- Code to diagram: paste Python code and get the flowchart; lines with no block become comments.
- Complexity: the algorithm runs for several sizes n, its steps are drawn beside n, n log n and n², and the best fit is named.
- Arrays panel: arrays drawn as bars or boxes and matrices as a grid while the algorithm runs; read elements amber, written green.
- Step back and a timeline: a Back button (F8) and a slider take the run back to any earlier step.
- Templates: sorting, Binary Search, recursion and records among others.
The algorithm plugins
Requirements
- Moodle: 4.5 LTS to 5.3 (PHP as required by your Moodle version).
- Companion plugins (optional): filter_algorithm 2.15.0 (Run / Step, the student features and class work for readers), qtype_algorithm 2.14.0 (quiz question type with automatic grading and Parsons problems), and tiny_codelab 1.12.0 with a Jobe server for Run the code.
Privacy
The editor and interpreter run in the browser. Only when the site has the CodeLab plugins and the user presses Run the code is the generated program, with its input, sent to the Jobe server set up in CodeLab; nothing else 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, Serbian, German, French, Spanish, Italian, Portuguese, Polish, Croatian, Bosnian, Slovenian, Macedonian, Slovak and Czech.
Source, documentation and issue tracker:
github.com/blagojevicboban/moodle-tiny_algorithm
Licensed under the GNU GPL v3 or later.