Recently Updated Pages

Language Pack Cache

You can purge the language pack cache through the Cache Administration page. Simply find the Lang...

Too Many Connections

When your Moodle database is overloaded you might see errors like this (MySQL/MariaDB) in your PH...

Setting up a Scheduled Task for your Plugin

Ther are two parts to setting up a scheduled task in your plugin. Create the task class under c...

Welcome

Welcome to the Moodle Wiki, where you can find all kinds of useful information related to Moodle ...

PHP Session Save Path

You can find the session.save_path through php info or using the command line: php -i | grep ses...

Learn PHP

PHP: The Right Way "PHP: The Right Way is an easy-to-read, quick reference for PHP popular codin...

PHP get key and value in loop

A cool little trick with foreach loops in PHP is you can get both the key and the value of associ...

PHP Syntax Check

Ever had to make a change to a PHP file on the fly only to discover you made a syntax error? E.g....

Assigning Site Administrations through the Database

The following steps can be used to add your user as a siteadmin in the database if required. Ste...

Undefined Property $webserviceprotocols

When this error occurs there is no result from the web service. In the PHP error log the followin...

Hide My Profile Messages

To hide the navigation: My Profile > Messages For all users: This is set by the config...

Hide My Profile Forum Posts

To hide the navigation: My Profile > Forum Posts For all users: Set the configuration ...

Convert URL object to string

There’s a method in the moodle_url class in lib/weblib.php called __toString() which will convert...

Page Layouts

Page layouts are used to determine how each page is rendered via the following call: $PAGE->s...

Time Zones

Moodle time zone information in the first instance is loaded from: https://download.moodle.org/t...

WSDL for a SOAP based Web Service

When you enable SOAP based web services through Moodle: Site administration > Plugins > ...

Forcing Plugin Reinstallation

The easiest way to get moodle to re-run installation is to update the version in version.php. Ho...

Useful URL Shortcuts

Sometimes rather than navigating, it is easier to type in the relevant URLs, particularly if you ...

Site Configuration

There's a handy CLI tool available in recent versions of Moodle to get and set site and plugin/co...

Get Records SQL giving incorrect result

If you have code that uses $DB->get_records_sql() and it is only giving you one row, or an inc...

Back to top