CodeLab: Runnable Program Examples in the VS Code Editor
Insert program examples in 27 languages (including C, C++, Python, Java, C#, JavaScript, TypeScript, Go, Rust, SQL and HTML/CSS/JS) into any Moodle text, edit them in Monaco and run them on Jobe, on the CodeLab runner or in the browser.
Live demo: try CodeLab on codelab.tsp.edu.rs as a guest (Python runs in the browser), or sign in with teacher or student (password Demo-2026) for every language, the debugger and SQL. Reset nightly.
What's New in v1.24.0
- 29 interface languages: added 14 new translations (Portuguese Brazil, Turkish, Dutch, Russian, Ukrainian, Romanian, Hungarian, Bulgarian, Greek, Albanian, Japanese, Simplified Chinese, Korean and Arabic).
- HTML / CSS / JS live preview in the browser: runs web examples with companion CSS and JS tabs inside a strictly sandboxed preview frame with a console panel and no server required.
- 17 new programming languages on the CodeLab runner (27 total): TypeScript, Bash, Go, Rust, R, Ruby, Lua, Kotlin, Perl, Octave, Julia, Scheme, Dart, Scala, Elixir, Swift and Haskell, offered automatically when installed on the server.
- Updated Monaco Editor bundle: includes native syntax highlighting for the new languages, HTML, CSS and XML.
Core features
- VS Code editor: Monaco with syntax highlighting, search, multi-file tabs, zoom, word wrap, full screen, and tooltips with variable values and beginner help.
- Typing help and error help: code completion and program templates for every language (Jedi for Python), instant explanations for 40 common GCC and Clang errors, and optional AI explanations through Moodle's AI subsystem.
- Jobe or CodeLab runner: choose the execution server, with GCC, Clang or MSVC compatibility mode for C/C++, per-user limits and a server test page.
- Interactive runs and Python in the browser: live terminal input on the CodeLab runner (with Safe mode for C/C++) or in-browser Python via Pyodide with turtle graphics.
- SQL and files: MySQL examples with a hidden setup of tables on the CodeLab runner; up to 5 input files per example, and files the program writes appear under the console.
- Debugger and Memory view: breakpoints, Step over and out, call stack, call tree, step back timeline, pointer arrows down linked lists to NULL, and heap leak warnings.
- Complexity and Flowchart bridge: measure Python step growth against n, n log n and n², and exchange Python programs with the Algorithm flowchart plugins.
- Themes, accessibility and phones: Light, Dark and High Contrast themes, reduced motion, screen reader announcements and mobile-friendly input.
The CodeLab plugins
Requirements
- Moodle: 4.5 LTS to 5.3.
- Execution server: Jobe or the open-source CodeLab runner (github.com/blagojevicboban/codelab-runner). Browser Python needs Chrome or Edge 137+ and works without a server.
- Hosted runner (optional): paid monthly quota plan by Boban Blagojević (boban.blagojevic@tsp.edu.rs). Not required.
- CodeLab filter: install and enable it in Site administration, Plugins, Filters, Manage filters.
Privacy
Programs and input are sent to the configured Jobe or CodeLab runner server to compile and run; interactive sessions use a short-lived signed token with only the numeric user id and keep nothing after exit. Browser Python loads Pyodide from the configured URL without sending code. Optional AI explanations use Moodle's AI subsystem. Implements the Moodle Privacy API.
Developed by Boban Blagojević. 29 languages: en, sr_lt, sr_cr, de, fr, es, it, pt, pt_br, pl, hr, bs, sl, mk, sk, cs, tr, nl, ru, uk, ro, hu, bg, el, sq, ja, zh_cn, ko, ar. Bundles Monaco Editor (MIT).
Source and issues: github.com/blagojevicboban/moodle-tiny_codelab
Licensed under the GNU GPL v3 or later.