Configuration reference—administration settings

Each parameter in the Site administration menu can be configured via config.php. If a value has been set via this method, it is effectively hard-coded and cannot be changed via the Moodle interface; not even by the administrator.

For example, you might want to make sure that an administrator does not, even by accident, turn on HTTPS for logins. Activating this would lock everybody out of the site if no SSL certificate is installed. To do this, enter the following line in config.php.

$CFG->loginhttps=false;

How do you know what parameter is called? Go to the respective setting in Moodle (in this case, Security | HTTP security) and you will see the name of the parameter underneath the label.

If the value ...

Get Moodle 2 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.