For the online learning world

Elearning WorldLMSMoodleTechnical

Skills and Tools for Moodle LMS Developers

Are you considering getting into Moodle LMS development? This month we will be talking about the skills you will need and suggested tools to help you get started.

Before going any further, start by creating an account on Moodle.org. You will need this to access the Moodle General Developer forum, where you can ask questions, get help, and download plugins into your development instance of Moodle.

Moodle LMS Development Skills

To develop in Moodle, you will need some skills covering the technologies that Moodle is built upon:

  • PHP 7.4+ – Moodle is written in PHP. Note that Moodle is a complex level application.
  • MySQL/MariaDB or PostgreSQL – While you may not need it in the beginning, you will likely need it eventually. Moodle has a complex database schema.
  • HTML5 – Like anything else that is displayed in your web browser.
  • SCSS/CSS/Bootstrap 4 – You don’t absolutely need this to get started, but it will help make anything you produce look better.
  • JavaScript/jQuery/AMD – You don’t absolutely need these to just get started, but you may eventually want to make your user interface a little more dynamic or integrate Moodle with other sites and services.
  • Mustache – the templating system. More of Moodle LMS uses templates with each new release.
  • Git/GitHub (optional) – To be able to get Moodle and 3rd party plugins, contribute source code back to their respective sources, and publish your own plugins/themes. It is optional because you can do Moodle development for yourself without it but you will quickly find that it sure comes in handy. There are some graphical user interfaces (GUI) but most people often end up at the command prompt because it is easier and more powerful than most GUIs.
  • Markdown – Documentation such as a plugin’s README file and other documentation are often written in markdown format.

Moodle also makes use of JSON, XML and AJAX. For more advanced developers, your skillset should also include PHPUnit testing, NodeJS/npm and Travis.

You don’t need to be an expert at each of these when you are getting started. But it does help reduce the learning curve if you have a good foundation upon which to build your development skills in Moodle.

Moodle LMS Development Tool Chest

A development environment should include a working instance of Moodle:

  • Operating system – Linux is most recommended however you can also do development on Windows or Mac OS.
  • A web server – Apache and/or NGINX is recommended. This should be the same web server that you will be using for your live/production site.
  • Database server – MySQLMariaDB and PostgreSQL are the most supported. This should be the same database server that you will be using for your live/production site.
  • PHP – Moodle’s back end is written in PHP. Be sure to check the system requirements to ensure that the version of PHP you will be using is compatible with the version of Moodle.
  • How to use the Command line/Terminal/Shell of your operating system.
  • A working instance of a Moodle LMS site – As a beginner, you may find it easier to set up and work if it is installed on your computer.

You should also have:

  • Git (for Windows) and GitHub – For source code version control system. Moodle LMS and most 3rd party plugins are available on GitHub.
  • Code editors – such as Visual Studio Code (VSCode), phpStormNetBeans or Eclipse PDT. It is helpful if they include useful features such as code completion, code highlighting and Xdebug. It should also be able to handle large source code files as some of Moodle’s libraries can be pretty big.
  • If you plan on developing REST endpoints for web services, a tool such as Postman can be very useful.
  • Will you be sending emails from within Moodle? You will likely find a local SMTP server and client useful such as Papercut SMTP for Windows or SMTP4DEV for Windows, Linux and Mac OS.
  • Moosh – A command-line tool to perform various administrative tasks on your Moodle site. It is similar in concept to Drush for Drupal or WP-CLI for WordPress. Note that it is not 100% compatible with Windows environments.
  • Moodle Development Kit (MDK) – A simple tool to avoid repeating cumbersome and/or boring tasks.
  • A file comparison tool – WinMerge (free) for Windows, Meld (free) for Linux and Windows and Beyond Compare ($$$) for Windows, Mac OS and Linux – assuming that your code editor doesn’t already come with this feature built-in.
  • A password manager – Besides keeping your passwords safe, password managers such as RoboformLastPass1PasswordDashlane and others will keep you sane and save you a lot of time when you are troubleshooting a page containing a form that you need to repeatedly fill out. Just be sure to pick one that integrates with your web browser and does not require you to copy and paste information into your browser.

Some recommended Moodle development tools you should consider installing on your development site include:

  • Moodle Plugin Skeleton Generator – You can either use this to generate a skeleton of many of the types of Moodle plugins or you can clone and customize an existing plugin.
  • Code-Checker – Check your work to ensure that it meets Moodle coding standards.
  • Moodle PHPdoc check – Check your work for basic documentation in the code.
  • Theme Tester – Useful if you are developing a theme.
  • Theme Selector – This makes it easier to switch between Boost and your custom theme.
  • Moodle Adminer – To view and make direct changes to the database from within Moodle.
  • Xdebug Helper for Chrome, Firefox, Edge and Safari – A plugin to make it easier to turn Xdebug on and off.
  • PHP CodeSniffer (PHPCS) – A command-line (CLI) tool that analyzes PHP source code to ensure that it adheres to Moodle coding guidelines. Includes a fixer (PHPCBF) that can fix some coding standard issues. Tip: A version of PHPCS configured for Moodle is included with the previously mentioned Code-Checker plugin.
  • Behat – A behaviour-driven development (BDD) framework that allows you to define and automate testing of features, scenarios, steps and actions using natural language in a web browser.
  • PHPUnit – An advanced unit testing framework to test PHP code.
  • GitHub Actions – Automates running testing frameworks and code analysis tools.
  • Composer / NPM / NVM / Node.js / Grunt – These tools are used to install and configure many of the command-line (CLI) testing tools.

Web-Based Moodle LMS Development Tools

Last but not least, here are a few useful tools for your browser and online:

  • WAVE Evaluation Tool for Chrome, Firefox and Edge – A Chrome plugin to help you test for accessibility compliance.
  • Accessible Color Generator – Don’t have enough contrast between the foreground and background colours of your text? Give this handy tool your choice of colours and it will find the closest matching colours that meet the accessibility guidelines. Takes all the guesswork out of choosing compliant colours.
  • SCSS Compiler / SaaS Playground – While Moodle will compile SCSS for you, these online SCSS compilers will also help you identify errors in your SCSS.
  • Regex101 – This is a nice regular expression workbench for PHP, JavaScript and other languages.
  • Deepl – One of the most recommended online tools for translating your plugin’s strings of text into other languages.
  • AMOS – Contribute language translations of plugins available on Moodle.org into other languages (all plugins should be developed in English first).
  • Pixlr and Photopea – For all your graphics and photo editing needs, this is a free online editor similar to Photoshop. If you need to remove a person or object from a photo, give PhotoRoom’s Remove Object from Photo tool a try.
  • Encode and Decode Base64 – Sometimes it is just easier to use this tool.

Once you have these skills and tools, you will be ready to learn how to do development in Moodle LMS – once you get your coffee of course.

Share your favourite development environment and development tools for Moodle LMS in the comments below.

See you next month!

Michael Milette

Michael Milette
Follow me

Michael Milette

Michael Milette is the owner and an independent consultant with TNG Consulting Inc. in Canada. He works with government, non-profit organizations, businesses and educational institutions on Moodle-related projects. Michael writes about implementing Moodle LMS, developing in Moodle, Moodle administration, using the FilterCodes plugin (his own project), creating multi-language Moodle implementations and courses, and WCAG 2.1 accessibility.

Add a reply or comment...