Moodle Developer documentation
Andrew Nicols
Aug 15, 2018
Contents:
1 Getting Started 31.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Projects for new developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Moodle Tracker 72.1 Useful tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Contributing to Moodle 93.1 Plugins adoptions programme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 The Moodle Roadmap 11
5 Testing 135.1 Testing with Behat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6 Requirements 156.1 Supported Versions of PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.2 Supported Database Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7 Release Notes 177.1 3.5 (LTS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
i
ii
Moodle Developer documentation
Moodle is the World’s largest Open Source Learning Management System.
Contents: 1
Moodle Developer documentation
2 Contents:
CHAPTER 1
Getting Started
1.1 Installation
This document will show you how to get your first development environment configured. You can have your firstMoodle site setup in less than five minutes, ready to develop your first plugin, submit your first bug fix, or work onyour first theme.
There are several ways to run with Moodle, but if you’re new to this, we’d recommend that you start with Docker.If you already have your own development environment fully configured, then you probably want to take a look atinstalling Moodle locally documentation.
1.1.1 Using Docker
This guide assumes that you already have Docker installed. If not, head on over to the Installing Docker documentationfirst.
Moodle has released a series of Docker images which allow testing of the full range of supported Database servers
1.1.2 Install locally
Foo
1.2 Projects for new developers
If you are looking for small projects to get started on as a new developer then you’re in the right place.
Each of these projects has been suggested by an experienced Moodle Developer as a potential project to introduce youto the Moodle development processes, and to different parts of the Moodle codebase.
You may also like to consider adopting a plugin seeking a new maintainer. See the Plugins adoption programme
3
Moodle Developer documentation
As you become more involved in Moodle development, you might like to learn more about the coding conventionsused and how changes to Moodle core code are processed.
This evolving page lists possible Moodle projects for new developers derived from community suggestions and listsprojects together with experienced core developers willing to mentor new developers.
If you have any ideas for new features in Moodle which might be suitable as projects for new developers, please seeNew feature ideas.
1.2.1 Additional notes for GSOC Students
If you are considering working on one of these projects, or combining several of these projects, as a Google Summerof Code Project please note that we require prospective students to make an attempt at fixing at least 1 issue in theMoodle tracker before their proposal can be considered.
This MUST be completed before your application can be considered valid.
1.2.2 Projects
Migrate Moodle Mobile publishing scripts to Gulp tasks
Right now the Mobile app uses several scripts for common tasks related to publishing.
Those scripts should be migrated to Gulp tasks so they are available among the other tasks already implemented.
Tasks
• Migrate the prepare-release-version.sh script to gulp task
• Migrate the prepare-release-integration.sh script to gulp task
• Improve previous scripts to compile the resulting app via Phonegap Build API
• Migrate the rest of scripts that synchronizes language translations
Requirement for prospective student
We require prospective students to set-up a local development environment of the Mobile app (and run it locally) fol-lowing this documentation: Setting_up_your_development_environment_for_Moodle_Mobile_2, students must pro-vide a video or detailed screenshots including a detailed explanation of what they did to run the app locally.
Skills required JavascriptDifficulty level MediumPossible mentor Juan Leyva
:: several scripts: https://github.com/moodlehq/moodlemobile-scripts
Migrate end-to-end testing support in the Mobile App to Ionic 3
Protractor is an end-to-end test framework for AngularJS applications. Protractor runs tests against your applicationrunning in a real browser, interacting with it as a user would.
There are almost 167 e2e tests in the Mobile app (see detailed information here).
4 Chapter 1. Getting Started
Moodle Developer documentation
The aim of this project is to upgrade the existing end-to-end testing support in the Mobile app to Ionic 3 (the originaltests were implemented for Ionic 1/AngularJS).
Tasks
• Upgrade the Node, Protractor and dependencies versions to be able to run tests in modern environments.
• Update all the tests so they can run in the new version of the framework (Ionic 3)
• Update Moodle Mobile documentation with new instructions for setting up both environments.
Requirement for prospective students
• We require prospective students to set-up and run in a local environment the existing tests following this doc-umentation: Moodle Mobile End To End Testing, student must record a video of the tests running on a localmachine.
• We also require students to create an additional test (detailed instructions for writing tests are available in theprevious link)
Skills required Javascript (Angular and Ionic 3)Difficulty level MediumPossible mentor Juan Leyva
Improving the Moodle SCORM Plugin
There are a number of areas of SCORM that could be improved. Some of these are bigger projects and others couldbe combined to form a single project.
These are just some examples, take a look at the open SCORM issues in the Moodle tracker for a list of other issues... :todo Link to the tracker here.
Improve Grading MDL-51086, MDL-52871, MDL-37421Improve validation of SCORM packages MDL-38060, MDL-24057Convert YUI Treeview to use Native JS Moodle is moving away from YUI and the existing Treeview has
a few issuesChoose where to send users after completingSCORM
MDL-61677
Projects notes
Skills required PHPDifficulty level MediumPossible mentor(s) Dan Marsden
1.2. Projects for new developers 5
Moodle Developer documentation
6 Chapter 1. Getting Started
CHAPTER 2
Moodle Tracker
2.1 Useful tips
7
Moodle Developer documentation
8 Chapter 2. Moodle Tracker
CHAPTER 3
Contributing to Moodle
3.1 Plugins adoptions programme
9
Moodle Developer documentation
10 Chapter 3. Contributing to Moodle
CHAPTER 4
The Moodle Roadmap
11
Moodle Developer documentation
12 Chapter 4. The Moodle Roadmap
CHAPTER 5
Testing
Each Moodle release passes through a stringent set of testing procedures which include a range of manual, and auto-mated testing.
The manual testing includes testing of individual issues included in Moodle, and our QA process.
Automated testing includes both PHPUnit, and Behat.
5.1 Testing with Behat
Behat is a functional testing suite. . .
5.1.1 Installing Behat
Install using Moodle:
php admin/tool/behat/cli/init.php
13
Moodle Developer documentation
14 Chapter 5. Testing
CHAPTER 6
Requirements
Moodle has support for a wide range of server environments, and supports a wide range of client-side browsers.
The exact versions supported change from version to version, but the general support statements are described here.
6.1 Supported Versions of PHP
Since Moodle 3.5 (MDL-59159), these rules apply to decide the Minimum PHP and Moodle versions supported:
1. A LTS will always require the previous LTS (or later) for upgrading.
2. The maximum PHP version supported for a branch will be the max one achieved along the life of the branch.Usually with .0 releases but may happen later (we added support for php70 with 3.0.1, for example).
3. The minimum PHP version supported for a branch will be the lower of:
• The minimum version supported in any way by php the day of the Moodle release (so we provide slow, progres-sive increments).
• The maximum PHP version supported by the previous LTS branch (so we guarantee jumping between LTS ispossible without upgrading PHP at the same time).
6.2 Supported Database Servers
Moodle officially supports the following Database Engines:
• Postgres
• MariaDB
• MySQL
• MSSQL
• Oracle
15
Moodle Developer documentation
16 Chapter 6. Requirements
CHAPTER 7
Release Notes
From Moodle 2.6 onwards, the end of support, both general and security, happens the second Monday of May andNovember, observing the 12, 18. . . month periods, no matter if the major release was delayed or not.
The most recent long-term support release (LTS) version is Moodle 3.5.
7.1 3.5 (LTS)
Version Release date Build number Release Notes Upgrade notesMoodle 3.5.0 17 May 2018 2018051700 Release Notes Upgrading to 3.5Moodle 3.5.1 9 July 2018 2018051701 Release Notes
Bug fixes for general core bugs in 3.5.x will end 13 May 2019 (12 months). Bug fixes for security issues in 3.5.x willend 10 May 2021 (36 months).
7.1.1 3.5.0
Here is the full list of fixed issues in 3.5.
See our New Features page for a more user-friendly introduction to Moodle 3.5 with screenshots.
If you are upgrading from previous version, make sure you read the Upgrading documentation.
17
Moodle Developer documentation
Server requirements
These are just the minimum supported versions. We recommend keeping all of your software and operating systemsup-to-date.
• Moodle upgrade: Moodle 3.1 or later
• PHP version: minimum PHP 7.0.0 Note: minimum PHP version has increased since Moodle 3.3. PHP 7.1.xand 7.2.x are supported too. PHP 7.x could have some engine limitations.
• PHP extension intl is required since Moodle 3.4 (it was recommended in 2.0 onwards)
• (Recommendation only) If you use MySQL or MariaDB, make sure your database supports full UTF-8(utf8mb4) if you install a new instance of Moodle. CLI script may be used to convert to utf8mb4 if you’reupgrading. You may choose to keep using ‘utf8_*’, but then a warning will show that the database isn’t usingfull UTF-8 support and suggest moving to ‘utf8mb4_unicode_ci’. See MySQL full unicode support for details.If you do enable utf8mb4 you must use the Barracuda file format.
18 Chapter 7. Release Notes