Book Image

Moodle Administration

By : Moodle Trust, Alex Büchner
Book Image

Moodle Administration

By: Moodle Trust, Alex Büchner

Overview of this book

Table of Contents (22 chapters)
Moodle Administration
About the Author
About the Reviewer

Configuration Reference: Administration Settings

Each parameter in the Site Administration block menus can be configured via the config.php file. If a value has been set via this method, it is effectively hardcoded 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. Turning this on would lock everybody out of the site if no SSL certificate is installed. To do this, enter the following line in config.php:


How do you know what the 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 value is specified in config.php, Moodle will display Defined in config.php besides the parameter, which indicates that the setting cannot be changed by the user. Invalid values are also shown for these hardcoded settings. In the following screenshot, the Debug messages value is incorrect while the Display debug messages value is correct:

The value that a parameter accepts depends on the type of setting. The table provides information for each type:


Moodle Field




True or 0 and false or 0.


Number Field

The number.


Text Field

Text has to be surrounded by single quotes.


Password Field

Passwords have to be surrounded by single quotes.


Pull-Down Menu

Each value is represented by a number. Unfortunately, there is no consistency for the allocation. For example, while the debug parameter accepts the values 0, 5, 15, 6143, and 38911, the sitemailcharset parameter accepts 0, EUC-JP, and GB18030! The easiest way to find out what values are valid is to check the database. Go to mdl_config, browse for the field with the same name as the parameter, and use that value in the configuration file.


Multi-select Menu

The same applies as for the list type. Values are separated by commas. Again, check mdl_config to be on the safe side.

There are some other special types that are mentioned when applicable. For each parameter, the type is put in brackets in the reference part of this appendix.