|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Definition at line 113 of file adminlib.php.
Add libraries.
Definition at line 112 of file adminlib.php.
| admin_apply_default_settings | ( | $ | node = NULL, |
| $ | unconditional = true |
||
| ) |
settings utility functions
This function applies default settings.
| object | $node,NULL | means complete tree, null by default |
| bool | $unconditional | if true overrides all values with defaults, null buy default |
Definition at line 5945 of file adminlib.php.


Test if and critical warnings are present
Definition at line 522 of file adminlib.php.


| admin_externalpage_setup | ( | $ | section, |
| $ | extrabutton = '', |
||
| array $ | extraurlparams = null, |
||
| $ | actualurl = '', |
||
| array $ | options = array() |
||
| ) |
Initialise admin page - this function does require login and permission checks specified in page definition.
This function must be called on each admin page before other code.
moodle_page $PAGE
| string | $section | name of page |
| string | $extrabutton | extra HTML that is added after the blocks editing on/off button. |
| array | $extraurlparams | an array paramname => paramvalue, or parameters that need to be added to the turn blocks editing on/off form, so this page reloads correctly. |
| string | $actualurl | if the actual page being viewed is not the normal one for this page (e.g. admin/roles/allow.php, instead of admin/roles/manage.php, you can pass the alternate URL here. |
| array | $options | Additional options that can be specified for page setup. pagelayout - This option can be used to set a specific pagelyaout, admin is default. |
Definition at line 5806 of file adminlib.php.

| admin_find_write_settings | ( | $ | node, |
| $ | data | ||
| ) |
Internal recursive function - finds all settings from submitted form
| object | $node | Instance of admin_category, or admin_settingpage |
| array | $data |
Definition at line 6039 of file adminlib.php.

| admin_get_root | ( | $ | reload = false, |
| $ | requirefulltree = true |
||
| ) |
Returns the reference to admin tree root
Definition at line 5900 of file adminlib.php.

| admin_output_new_settings_by_page | ( | $ | node | ) |
Internal function - returns arrays of html pages with uninitialised settings
| object | $node | Instance of admin_category or admin_settingpage |
Definition at line 6132 of file adminlib.php.

| admin_search_settings_html | ( | $ | query | ) |
Internal function - prints the search results
| string | $query | String to search for |
Definition at line 6071 of file adminlib.php.

| admin_write_settings | ( | $ | formdata | ) |
Store changed settings, this function updates the errors variable in $ADMIN
| object | $formdata | from form |
Definition at line 5980 of file adminlib.php.

| any_new_admin_settings | ( | $ | node | ) |
Based on find_new_settings() in upgradesettings.php Looks to find any admin settings that have not been initialized. Returns 1 if it finds any.
| object | $node | Instance of admin_category, or admin_settingpage |
Definition at line 6252 of file adminlib.php.
| db_replace | ( | $ | search, |
| $ | replace | ||
| ) |
Moved from admin/replace.php so that we can use this in cron
| string | $search | string to look for |
| string | $replace | string to replace |
Definition at line 6280 of file adminlib.php.

| drop_plugin_tables | ( | $ | name, |
| $ | file, | ||
| $ | feedback = true |
||
| ) |
Delete all plugin tables
| string | $name | Name of plugin, used as table prefix |
| string | $file | Path to install.xml file |
| bool | $feedback | defaults to true |
Iterate over, fixing id fields as necessary
Definition at line 395 of file adminlib.php.


| format_admin_setting | ( | $ | setting, |
| $ | title = '', |
||
| $ | form = '', |
||
| $ | description = '', |
||
| $ | label = true, |
||
| $ | warning = '', |
||
| $ | defaultinfo = NULL, |
||
| $ | query = '' |
||
| ) |
Format admin settings
| object | $setting | |
| string | $title | label element |
| string | $form | form fragment, html code - not highlighted automatically |
| string | $description | |
| bool | $label | link label to id, true by default |
| string | $warning | warning text |
| sting | $defaultinfo | defaults info, null means nothing, '' is converted to "Empty" string, defaults to null |
| string | $query | search query to be highlighted |
Definition at line 6187 of file adminlib.php.


| get_component_version | ( | $ | component, |
| $ | source = 'installed' |
||
| ) |
Returns the version of installed component
| string | $component | component name |
| string | $source | either 'disk' or 'installed' - where to get the version information from |
Definition at line 316 of file adminlib.php.


Returns list of all directories where we expect install.xml files
First, the main one (lib/db)
Then, all the ones defined by get_plugin_types()
Definition at line 463 of file adminlib.php.


Returns names of all known tables == tables that moodle knows about.
Definition at line 433 of file adminlib.php.


| is_dataroot_insecure | ( | $ | fetchtest = false | ) |
Try to verify that dataroot is not accessible from web.
Try to verify that dataroot is not accessible from web. It is not 100% correct but might help to reduce number of vulnerable sites. Protection from httpd.conf and .htaccess is not detected properly.
INSECURE_DATAROOT_WARNING INSECURE_DATAROOT_ERROR
| bool | $fetchtest | try to test public access by fetching file, default false |
Definition at line 566 of file adminlib.php.


| is_float_problem | ( | ) |
Detects if float supports at least 10 decimal digits
Detects if float supports at least 10 decimal digits and also if float-->string conversion works as expected.
Definition at line 547 of file adminlib.php.
| set_cron_lock | ( | $ | name, |
| $ | until, | ||
| $ | ignorecurrent = false |
||
| ) |
Try to obtain or release the cron lock.
| string | $name | name of lock |
| int | $until | timestamp when this lock considered stale, null means remove lock unconditionally |
| bool | $ignorecurrent | ignore current lock state, usually extend previous lock, defaults to false |
Definition at line 491 of file adminlib.php.


| uninstall_plugin | ( | $ | type, |
| $ | name | ||
| ) |
Automatically clean-up all plugin data and remove the plugin DB tables
| string | $type | The plugin type, eg. 'mod', 'qtype', 'workshopgrading' etc. |
| string | $name | The plugin name, eg. 'forum', 'multichoice', 'accumulative' etc. global $OUTPUT to produce notices and other messages |
Definition at line 123 of file adminlib.php.
