Search Filters
Search Results
107 total results found
Custom Email Signup Registration Form
You can modify the custom auth/email signup registration page with the following steps (note this...
Unknown Error Upgrading Plugin to Version
If you are getting an error like this when attempting to upgrade a plugin: !!! Unknown error upg...
Disk Usage by Course
The following query provides a summary of the disk space usage (in bytes) and number of files use...
Email Settings on Test and Development
There are a number of settings provided by Moodle for test and development environments specifica...
Set User IDs that will always see debug messages
There’s a handy feature in Moodle configuration called $CFG->debugusers = '<moodle_user_ids...
Resetting a User's Password
If you have access to the Moodle application server, you can use the admin/cli/reset_password.php...
Replacing strings in the database
There is a tool provided with Moodle to replace strings in your database with another value. This...
Site Stuck at Upgrade
If you encounter the following: !!! Site is being upgraded, please retry later. !!! This in...
XMLDB Editor and Reserved Names
One (of the many) good reasons to use the XMLDB editor in Moodle rather than hacking the db/insta...
Scheduled Tasks: A lock was created but not released
Schedule tasks can use two types of locks: Database locks — lock_db table File locks — dirroot...
Query the Grade Scale Value
Grade scales are stored in the mdl_scale table, however they are stored as a comma-separated list...
Be careful with backups of config.php
One big security hole that is all too common with Moodle is to take a backup of the config.php fi...
Can’t create a new XMLDB file
The Moodle XMLDB plugin does some checks of the db/ folder in your plugin to ensure it has read/w...
Make a Select Form Field Required
When adding a form rule for select (or multiple select) fields, these need to be applied on the c...
Getting the Moodle Base/Root Directory
The moodle root directory $CFG->dirroot is established in the file lib/setup.php along with ot...
Debug SQL generated by $DB methods
A handy debugging tip, if you need to debug the SQL generated by any of the $DB methods (see DML ...
Dates before Unix Epoch
If you use a custom user profile field with a date and want to store a date that falls before Uni...
Move the Download Options Below a Table
If you are working with flexibile tables (lib/tablelib.php) in Moodle and have table download ena...
Plugin Dependencies
Plugin dependencies can be added using the $plugin->dependencies attribute in version.php. Th...
Overriding PHP Settings
There are a few ways to override global PHP (php.ini) settings with local settings. For example y...