Moodle — Codebase Overview
Repository
| Field | Detail |
|---|---|
| GitHub | moodle/moodle (mirror of git.moodle.org) |
| Stars | 6,910 |
| Forks | 7,356 |
| License | GPL-3.0 |
| Primary Language | PHP (~86% by code volume) |
| Total Commits | ~121,000+ |
| Contributors | 216 on GitHub (broader community much larger) |
| Created | 2001 (GitHub mirror established 2009) |
Language Breakdown
| Language | Approximate % |
|---|---|
| PHP | 86.1% |
| JavaScript | 9.1% |
| Gherkin (Behat tests) | 2.3% |
| CSS | 1.2% |
| Mustache (templates) | 1.0% |
| SCSS | 0.3% |
| TypeScript | <0.1% (emerging) |
Tech Stack
- Backend: PHP (custom framework, not based on Symfony/Laravel)
- Database: MySQL/MariaDB (most common), PostgreSQL, Microsoft SQL Server (multi-database abstraction layer via DML/DDL)
- Frontend: JavaScript (vanilla + AMD modules), jQuery (being reduced), Bootstrap 5 (as of 5.0/5.1)
- Template Engine: Mustache templates (server-side rendered)
- Build Tools: Grunt for CSS/JS compilation
- APIs: REST, XML-RPC, and SOAP web services; Mobile app API; External Functions API
- Standards: LTI 1.1/1.3, SCORM 1.2/2004, xAPI, IMS Common Cartridge, QTI
- Caching: Multi-layer caching (APCu, Redis, Memcached)
- Search: Pluggable search engine support (Solr)
- Task Processing: Built-in scheduled task and ad-hoc task system (cron-based)
- Testing: Behat (acceptance testing, ~2.3% of codebase), PHPUnit (unit testing)
- Requirements: PHP 8.2+ (8.3, 8.4 supported), 64-bit only, sodium extension required
Architecture Highlights
- Plugin architecture is Moodle's defining characteristic — 1,900+ community plugins available, with 40+ plugin types (activities, blocks, themes, question types, authentication, enrollment, repositories, etc.)
- Moodle's core is a monolithic PHP application with a modular internal structure
- 250+ database tables (aggregate of core + plugin tables)
- Database abstraction layer (DML/DDL) supports multiple RDBMS engines
- Hooks API (introduced 4.4, matured 4.5+) — plugins register callbacks in
db/hooks.php; supports pre/post/validation stages. Replacing legacy callback system. - Events API — action-based event broadcasting to observers (one-way, one-to-many)
- External Functions API + Web Services — fully parameterized methods exposed via REST/SOAP/XML-RPC
- AI Subsystem (introduced 4.5) — pluggable provider architecture for AI models (OpenAI, Azure, Ollama)
- Renderer/output layer separates logic from presentation
- Role-based access control with fine-grained capabilities system
- Multi-tenant not built-in (each instance typically serves one organization), though Moodle Workplace adds multi-tenancy
- Plugins are folders of PHP, CSS, JS with defined entry points (typically
lib.php)
Current Versions
| Version | Type | Released |
|---|---|---|
| 5.1.3 | Current stable (latest patch) | 2026 |
| 5.1.0 | Major release | October 2025 |
| 5.0.6 | Previous stable (latest patch) | 2026 |
| 5.0.0 | Major release | April 2025 |
| 4.5.x | LTS (long-term support) | October 2024 |
| 5.2dev | Development | Weekly builds on main |
Release cadence: biannual major releases (April and October). Even-numbered minor releases (4.1, 4.3, 4.5) are LTS versions.
Recent Development Activity
Moodle is very actively developed, with ~4,500 commits since January 2025 (~10+ commits/day), regular weekly integration builds on the main branch. Recent sample commits (March 2026):
weekly release 5.2devNOBUG: Add upgrade notesMDL-87264 core_question: fix upgrade notes missing type declarationMDL-87922— various community-contributed fixes
Development uses a Jira-based tracker (MDL-xxxxx issue keys) with a structured peer review and integration process. Key committers include Moodle HQ staff and community contributors via pull requests.
Moodle 4.5 LTS Key Features
- AI Subsystem introduced: Foundational AI placement and provider architecture
- Hooks API matured: Plugins can add/reorder secondary navigation menu items
- Bootstrap 5 refactoring began (Boost theme)
- Subsections feature: Nested course sections
- New progress bar API for adhoc tasks
- New web services for badges, private files, and submission removal
Moodle 5.0 Key Features (April 2025)
- Full Bootstrap 5 adoption: Cleaner code, faster load times, better mobile responsiveness
- AI "Your Way" philosophy: Support for multiple AI providers (OpenAI, Azure, Ollama for self-hosted)
- Granular AI access controls configurable at course and activity level
- AI policy acceptance report and AI usage monitoring report
- Activities Overview page: Consolidated view of activities, deadlines, submissions, grading
- Color-coded activity icons for improved navigation
- Relative date display ("Today", "Yesterday" instead of raw dates)
- Improved question bank filtering
- PHP 8.2+ required (8.3, 8.4 supported); 64-bit only; sodium extension required
Moodle 5.1 Key Features (October 2025)
- New
/publicdirectory: Web server document root must now point to/public— breaking infrastructure change improving security - New Routing Engine: Cleaner URLs, improved request handling
- Redesigned Activity Selector: Activities grouped by purpose (assessment, collaboration, communication, resources, interactive content)
- SMS notification support for administrators
- Activities overview page expanded: Now covers forums, quizzes, H5P, wikis, lessons, glossaries, BigBlueButton sessions
- Rich text editor improvements: Drag-and-drop media, improved image captions for accessibility
- Large question bank performance: Better handling of very large question banks and shared questions
- Continued AI integration improvements
- More mature BigBlueButton integration
Upcoming: Moodle 5.2 / 5.3
- Chat and Survey modules leaving core (becoming external plugins)
- Legacy callback system being replaced by Hooks API
- Ongoing deprecation cleanup of functions from 4.0 and earlier
- TypeScript adoption beginning
Key Technical Characteristics
- PHP-only backend: No compiled languages or separate application servers required
- Extremely broad hosting compatibility: Runs on commodity shared hosting up to enterprise infrastructure
- Mature plugin API: Well-documented, stable plugin interfaces across 40+ extension points
- Upgrade path: Reliable version-to-version upgrade system with built-in database migration
- Localization: Translated into 100+ languages via community translation platform (AMOS)
- Mobile: Official Moodle Mobile app (Ionic/Angular) with offline support
- Largest single-instance deployment: Open University of Beijing with 3.5 million users
Development Governance
- Moodle HQ (Moodle Pty Ltd, based in Australia) leads core development
- Open contribution model with peer review process
- Community plugins hosted on moodle.org/plugins
- Biannual major release cycle (April and October)
- Long-term support (LTS) releases on even-numbered minors, maintained for extended periods
- Open Jira-based issue tracker (tracker.moodle.org)