Recently Updated Pages

User Profile Field Select Options

If you need to get the list of user profile field select options for your plugin, you can query t...

Showing additional fields on user profile page

The fields displayed on the user profile page (public profile) are controlled by the code in lib/...

Office 365 Email Settings

A few tips when configuring an Office 365 email account for your SMTP server settings in Moodle: ...

Mahara and Google Analytics

You can add the Google Analytics script snippet to a configuration parameter called additionalhtm...

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...

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...

Back to top