Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Moodle 2 Administration

You're reading from   Moodle 2 Administration Moodle is the world‚Äôs most popular virtual learning environment and this book will help systems administrators and technicians administer the system effectively. Based on real-world scenarios with plenty of screenshots, it‚Äôs an essential practical gui

Arrow left icon
Product type Paperback
Published in Oct 2011
Publisher Packt
ISBN-13 9781849516044
Length 420 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (24) Chapters Close

Moodle 2 Administration
Credits
About the Author
About the Reviewers
1. www.PacktPub.com
2. PacktLib.PacktPub.com
3. Preface
1. Moodle Installation FREE CHAPTER 2. The Moodle System 3. Courses, Users, and Roles 4. Course Management 5. User Management 6. Managing Permissions: Roles and Capabilities 7. Moodle Look and Feel 8. Moodle Plugins 9. Moodle Configuration 10. Moodle Reporting 11. Moodle Security and Privacy 12. Moodle Performance and Optimization 13. Backup and Restore 14. Installing Third-party Add-ons 15. Moodle Integration via Web Services 16. Moodle Networking Configuration Settings

Configuration reference system settings


This is the actual reference of configuration settings. Explanations have been taken from help pages, forum posts, and comments in source code.

Default parameters

These are settings that have been created by the installer, derived from config-dist.php. Most parameters are compulsory for Moodle to operate, so be careful when changing any of them. The parameters are listed in the following table in the order in which they appear by default in config.php:

Parameter

Description

$CFG->dbtype (String)

The database system that is used. The four valid values are mysqli (MySQL), pgsql (PostgreSQL), mssql (MS SQL Server), and oci (Oracle).

$CFG->dblibrary (String)

Currently, only native is allowed as the entry value.

$CFG->dbhost (String)

The name of the database host. The valid value is localhost or 127.0.0.1 if the database is located on the server as Moodle. If the database is located on another server, the value is any other URL.

$CFG->dbname (String)

The name of database.

$CFG->dbuser (String)

The username of the database account.

$CFG->dbpass (String)

The password of the database account.

$CFG->prefix (String)

By default, all tables in Moodle are prefixed with mdl_. This should only be changed if you run multiple Moodle installations using the same database.

$CFG->dboptions (Array)

Values that determine database behavior. These include dbpersist (whether an existing database connection can be reused to improve performance, potentially decreasing stability), dbsocket (when Unix socket is used), and dbport (TCP port, if different from default).

$CFG->wwwroot (String)

This is the full web address (including http://) where Moodle has been installed.

$CFG->dataroot (String)

This is the absolute directory name where Moodle's data dictionary is located. The directory must be readable and writable; but must not be accessible via the web.

$CFG->admin (String)

The admin pages in Moodle are located in the admin directory. If this has to be changed then specify the new directory here, as some ISPs don't allow its usage. This approach is also potentially advantageous for securing the site from attacks.

$CFG->directorypermissions (Special)

These are the permissions in Unix format that are applied for directories which Moodle is creating. Default is 0777 (rwx).

$CFG->passwordsaltmain (String)

Random string added to the md5 password hash. See Chapter 11, Moodle Security and Privacy for details.

Optional parameters

There are over 350 parameters to be set in config.php that are not set by the installer nor can they be modified via the Moodle administrator interface. These optional parameters allow you to modify the behavior of Moodle without the requirement to change any code.

We only cover a representative list of settings ignoring ones that are only relevant to developers and designers. We have also disregarded obsolete and obscure parameters, as well as ones that have a counterpart in the admin settings. Parameters have been listed in alphabetical order and some have been grouped together for simplicity. Available types are Array (A), Binary (B), Numeric (N), List (L), and String (S):

Name

Type

Description

admineditalways

B

Setting this to true enables administrators to edit any post at any time.

amf_introspection

B

Security setting for AMF web service protocol

apacheloguser

N

Logging Apache: 0=off, 1=user ID, 2=full name, 3=username

apachemaxmem

N

Memory threshold over which Apache children will be reaped after they complete serving the request.

bounceratio

N

Default is 20. See $CFG->handlebounces.

coursemanager

A

List of roles that will be treated as if they are a teacher in every course (makes their name clickable on Course description page).

customfrontpageinclude

S

You can replace the front page with your own version. moodle.org uses this approach. Only the center area will be replaced, not the header, footer, or blocks.

customscripts

S

Enabling this will allow custom scripts (to be specified with full path names) to replace existing Moodle scripts. For example, if $CFG->customscripts/course/view.php exists then it will be used instead of $CFG->wwwroot/course/view.php. At present, this will only work for files that include config.php and are called as part of the URL (index.php is implied). Custom scripts should not include config.php.

Warning: Replacing standard Moodle scripts may pose a security risk and/or may not be compatible with upgrades. However, this is useful when having to patch a particular page without actually overwriting the core code.

debugusers

S

Comma-separated list of user IDs that always see debug messages.

defaultblocks

A

Default block variables for new courses; for instance, participants, activity_modules, search_forums, admin, course_list, news_items, calendar_upcoming, recent_activity. This setting can be overridden for different course types, such as defaultblocks_social, defaultblocks_weeks, and defaultblocks_topics.

dirroot

S

The absolute directory name where Moodle has been installed.

disablemycourses

B

This setting will prevent the My Courses page being displayed when a student logs in. The site front page will always show the same (logged-out) view.

disablestatsprocessing

B

Prevents stats processing and hides the GUI.

disableusercreationon restore

B

Completely disables user creation when restoring a course. Enabling this setting results in the restore process stopping when a user attempts to restore a course requiring users to be created.

divertallemailsto

S

Divert all outgoing e-mails to this address to test and debug e-mailing features.

emailconnectionerrorsto

S

E-mail database connection errors to someone. If Moodle cannot connect to the database, then e-mail this address with a notice.

enablegroupings

B

You can turn on/off grouping functionality.

filedir

S

You can specify an alternative to dataroot.

filelifetime

N

Seconds for files to remain in caches (default is 86400 = 24 hours). Decrease this if you are worried about students being served outdated versions of uploaded files.

filepermissions

 

Same as directorypermissions in the default parameters, but for created files.

forced_plugin_settings

A

Plugin settings have to be specified as an array of arrays:

array('plugin1' => array('param1' => 'value1', ('param2' => 'value2', …), ('plugin2' => array('param1' => 'value1', ('param2' => 'value2', …), …);

forcefirstname

forcelastname

S

To anonymize usernames for all students. If set, then all non-teachers will always see this for every person.

gradeoverhundredprocentmax

N

If set to unlimitedgrades, you can specify a maximum value (1 = 100 percent, default = 10).

handlebounces

B

This is for handling e-mail bounces. Used in conjunction with minbounces and bounceratio.

htmleditor

B

If set to false, only the Moodle text editor will be shown.

httpswwwroot

S

wwwroot for SSL pages.

includeuserpasswordsin backup

B

Allows user passwords to be included in backup files. Use only if you can guarantee that all your backup files remain private as password hashes can be unencrypted.

keeptempdirectorieson backup

B

Keep the temporary directories used by backup and restore them without being deleted at the end of the process.

langcacheroot

S

Location where aggregated strings are kept for caching.

langlocalroot

S

Alternative directory to $CFG->dataroot/lang.

langmenucachefile

S

Location where a list of available languages is cached.

logsql

B

Log every database query to a table called adodb_logsql. Be careful, as the table grows very quickly!

maildomain

S

Your e-mail domain.

mailprefix

S

mdl+ is the separator for Exim and Postfix, mdl- is the separator for qmail.

minbounces

N

Default is 10. See $CFG->handlebounces.

mnetkeylifetime

N

Number of days after which the networking key is expiring. See Chapter 16, Moodle Networking for details.

mycoursesperpage

N

Maximum number of courses to display in any list of a user's own courses (0 = one course).

noemailever

B

When working with production data on test servers, no e-mails or other messages should ever be sent to real users.

opensslcnf

S

Location of the openssl.cnf file.

preferlinegraphs

B

This setting will make some graphs (for instance, user logs) using lines instead of bars.

reverseproxy

B

Enable when setting up advanced reverse proxy load balancing configurations and port forwarding.

showcrondebugging

B

Add debug information to cron output.

showcronsql

B

Show executed SQL queries during cron execution.

skiplangupgrade

B

Disables automatic language updates and lets translators (language pack maintainers) to keep their moodledata/lang/* to update manually.

sslproxy

B

Enables when using external SSL appliance for performance reasons.

tagsort

S

Sort tags in tag cloud by specified field, default = name.

themedir

S

Adds extra theme directories outside of $CFG->dirroot.

themeorder

A

Priority of themes from highest to lowest. Default is array('course', 'category', 'session', 'user', 'site').

themerev

B

Prevents theme caching.

tracksessionip

B

Moodle will track the IP of the current user to make sure that it hasn't changed during a session. This will prevent the possibility of sessions being hijacked via XSS, but it may break things for users using proxies that change all the time, like AOL.

trashdir

S

Alternative location for $CFG->dirroot/trashdir.

undeletableblocktypes

A

The blocks in this list are protected from deletion; for example, Navigation, Settings, and so on.

unicodedb

B

This setting will put Moodle in unicode mode. Please note that your database must support it. Do not enable this if your database in not converted to UTF-8!

upgraderunning

B

Pretends Moodle update is running.

upgradeshowsql

B

Shows executed SQL queries during upgrades.

usepaypalsandbox

B

For testing PayPal using the PayPal developer sandbox.

lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image