|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Namespaces | |
| namespace | core |
Variables | |
$CFG | |
Holds the core settings that affect how Moodle works. Some of its fields are set in config.php, and the rest are loaded from the config table. Some typical settings in the $CFG global:
object $CFG | |
| global | $CFG |
| if(!isset($CFG)) $CFG | dirroot = dirname(dirname(__FILE__)) |
| if(!isset($CFG->dataroot)) $CFG | dataroot = realpath($CFG->dataroot) |
| if($CFG->dataroot===false) else if(!is_writable($CFG-> dataroot)) if(!isset($CFG-> wwwroot) or $CFG->wwwroot=== 'http://example.com/moodle') if(!isset($CFG->admin)) $CFG | libdir = $CFG->dirroot .'/lib' |
| $CFG | yui2version = '2.9.0' |
| $CFG | yui3version = '3.4.1' |
$DB | |
Used by library scripts to check they are being called by Moodle Database connection. Used for all access to the database. moodle_database $DB | |
| global | $DB |
$SESSION | |
Moodle's wrapper round PHP's $_SESSION. object $SESSION | |
| global | $SESSION = &$_SESSION['SESSION'] |
$USER | |
Holds the user table record for the current user. Will be the 'guest' user record for people who are not logged in. $USER is stored in the session. Items found in the user record:
object $USER | |
| global | $USER = &$_SESSION['USER'] |
| global | $SITE |
$PAGE | |
A central store of information about the current page we are generating in response to the user's request. moodle_page $PAGE | |
| global | $PAGE |
$COURSE | |
The current course. An alias for $PAGE->course. object $COURSE | |
| global | $COURSE |
$OUTPUT | |
$OUTPUT is an instance of core_renderer or one of its subclasses. Use it to generate HTML for output. $OUTPUT is initialised the first time it is used. See bootstrap_renderer for the magic that does that. After $OUTPUT has been initialised, any attempt to change something that affects the current theme ($PAGE->course, logged in use, httpsrequried ... will result in an exception.) Please note the $OUTPUT is replacing the old global $THEME object. object $OUTPUT | |
| global | $OUTPUT = new bootstrap_renderer() |
$MCACHE | |
Shared memory cache. object $MCACHE | |
| global | $MCACHE |
$FULLME | |
Full script path including all params, slash arguments, scheme and host. Note: Do NOT use for getting of current page URL or detection of https, instead use $PAGE->url or strpos($CFG->httpswwwroot, 'https:') === 0 string $FULLME | |
| global | $FULLME |
$ME | |
Script path including query string and slash arguments without host. string $ME | |
| global | $ME |
$FULLSCRIPT | |
$FULLME without slasharguments and query string. string $FULLSCRIPT | |
| global | $FULLSCRIPT |
$SCRIPT | |
Relative moodle script path '/course/view.php' string $SCRIPT | |
| enum | SITEID |
| global | $SCRIPT |
| $CFG | config_php_settings = (array)$CFG |
| if(!isset($CFG-> forced_plugin_settings)) $CFG | httpswwwroot = $CFG->wwwroot |
| $CFG | wordlist = $CFG->libdir .'/wordlist.txt' |
| $CFG | moddata = 'moddata' |
| enum SITEID |
| $OUTPUT = new bootstrap_renderer() |
| $CFG config_php_settings = (array)$CFG |
| if (!isset($CFG->forced_plugin_settings)) $CFG httpswwwroot = $CFG->wwwroot |
| $CFG yui2version = '2.9.0' |
| $CFG yui3version = '3.4.1' |