Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
adminlib.php File Reference

Classes

class  admin_category
 The object used to represent folders (a.k.a. More...
 
class  admin_externalpage
 Links external PHP pages into the admin tree. More...
 
class  admin_page_manageblocks
 Blocks manage page. More...
 
class  admin_page_managefilters
 Special class for filter administration. More...
 
class  admin_page_managemessageoutputs
 Message outputs configuration. More...
 
class  admin_page_managemods
 Module manage page. More...
 
class  admin_page_manageportfolios
 
class  admin_page_manageqbehaviours
 Manage question behaviours page. More...
 
class  admin_page_manageqtypes
 Question type manage page. More...
 
class  admin_page_managerepositories
 
class  admin_page_pluginsoverview
 General plugins manager. More...
 
class  admin_root
 Root of admin settings tree, does not have any parent. More...
 
class  admin_setting
 Admin settings class. More...
 
class  admin_setting_agedigitalconsentmap
 Used to validate the content and format of the age of digital consent map and ensuring it is parsable. More...
 
class  admin_setting_bloglevel
 Select for blog's bloglevel setting: if set to 0, will set blog_menu block to hidden. More...
 
class  admin_setting_configcheckbox
 Checkbox. More...
 
class  admin_setting_configcheckbox_with_advanced
 Checkbox with an advanced checkbox that controls an additional $name. More...
 
class  admin_setting_configcheckbox_with_lock
 Checkbox with an advanced checkbox that controls an additional $name. More...
 
class  admin_setting_configcolourpicker
 Colour picker. More...
 
class  admin_setting_configdirectory
 Path to directory. More...
 
class  admin_setting_configduration
 Seconds duration setting. More...
 
class  admin_setting_configduration_with_advanced
 Seconds duration setting with an advanced checkbox, that controls a additional $name. More...
 
class  admin_setting_configempty
 Empty setting used to allow flags (advanced) on settings that can have no sensible default. More...
 
class  admin_setting_configexecutable
 Path to executable file. More...
 
class  admin_setting_configfile
 Path to directory. More...
 
class  admin_setting_confightmleditor
 General text area with html editor. More...
 
class  admin_setting_configiplist
 Used to validate a textarea used for ip addresses. More...
 
class  admin_setting_configmixedhostiplist
 Used to validate a textarea used for domain names, wildcard domain names and IP addresses/ranges (both IPv4 and IPv6 format). More...
 
class  admin_setting_configmulticheckbox
 Multiple checkboxes, each represents different value, stored in csv format. More...
 
class  admin_setting_configmulticheckbox2
 Multiple checkboxes 2, value stored as string 00101011. More...
 
class  admin_setting_configmultiselect
 Select multiple items from list. More...
 
class  admin_setting_configmultiselect_modules
 Multiselect for current modules. More...
 
class  admin_setting_configpasswordunmask
 Password field, allows unmasking of password. More...
 
class  admin_setting_configpasswordunmask_with_advanced
 Password field, allows unmasking of password, with an advanced checkbox that controls an additional $name. More...
 
class  admin_setting_configportlist
 Used to validate a textarea used for port numbers. More...
 
class  admin_setting_configselect
 Select one value from list. More...
 
class  admin_setting_configselect_autocomplete
 Autocomplete as you type form element. More...
 
class  admin_setting_configselect_with_advanced
 Dropdown menu with an advanced checkbox, that controls a additional $name. More...
 
class  admin_setting_configselect_with_lock
 Select with an advanced checkbox that controls an additional $name. More...
 
class  admin_setting_configstoredfile
 Class used for uploading of one file into file storage, the file name is stored in config table. More...
 
class  admin_setting_configtext
 The most flexible setting, the user enters text. More...
 
class  admin_setting_configtext_with_advanced
 Text field with an advanced checkbox, that controls a additional $name. More...
 
class  admin_setting_configtext_with_maxlength
 Text input with a maximum length constraint. More...
 
class  admin_setting_configtextarea
 General text area without html editor. More...
 
class  admin_setting_configthemepreset
 Used to validate theme presets code and ensuring they compile well. More...
 
class  admin_setting_configtime
 Time selector. More...
 
class  admin_setting_countrycodes
 Allows to specify comma separated list of known country codes. More...
 
class  admin_setting_courselist_frontpage
 Special select - lists on the frontpage - hacky. More...
 
class  admin_setting_description
 No setting - just name and description in same row. More...
 
class  admin_setting_devicedetectregex
 Administration interface for user specified regular expressions for device detection. More...
 
class  admin_setting_emoticons
 Administration interface for emoticon_manager settings. More...
 
class  admin_setting_enablemobileservice
 Special checkbox for enable mobile web service If enable then we store the service id of the mobile service into config table If disable then we unstore the service id from the config table. More...
 
class  admin_setting_encryptedpassword
 Admin setting class for encrypted values using secure encryption. More...
 
class  admin_setting_filetypes
 Administration setting to define a list of file types. More...
 
class  admin_setting_flag
 An additional option that can be applied to an admin setting. More...
 
class  admin_setting_forcetimezone
 Forced user timezone setting. More...
 
class  admin_setting_grade_profilereport
 Selection of grade report in user profiles. More...
 
class  admin_setting_gradecat_combo
 Grade category settings. More...
 
class  admin_setting_heading
 No setting - just heading and text. More...
 
class  admin_setting_langlist
 Special setting for limiting of the list of available languages. More...
 
class  admin_setting_manage_fileconverter_plugins
 Generic class for managing plugins in a table that allows re-ordering and enable/disable of each plugin. More...
 
class  admin_setting_manage_plugins
 Generic class for managing plugins in a table that allows re-ordering and enable/disable of each plugin. More...
 
class  admin_setting_manageantiviruses
 Special class for antiviruses administration. More...
 
class  admin_setting_manageauths
 Special class for authentication administration. More...
 
class  admin_setting_managecontentbankcontenttypes
 Content bank content types manager. More...
 
class  admin_setting_managecustomfields
 Custom fields manager. More...
 
class  admin_setting_managedataformats
 Data formats manager. More...
 
class  admin_setting_manageenrols
 Special class for enrol plugins management. More...
 
class  admin_setting_manageexternalservices
 Special class for management of external services. More...
 
class  admin_setting_manageformats
 Course formats manager. More...
 
class  admin_setting_managemediaplayers
 Special class for media player plugins management. More...
 
class  admin_setting_managerepository
 Manage repository settings. More...
 
class  admin_setting_managewebserviceprotocols
 Special class for web service protocol administration. More...
 
class  admin_setting_my_grades_report
 Provides a selection of grade reports to be used for "grades". More...
 
class  admin_setting_php_extension_enabled
 Admin setting to show if a php extension is enabled or not. More...
 
class  admin_setting_pickfilters
 Admin setting that is a list of installed filter plugins. More...
 
class  admin_setting_pickroles
 Admin setting that allows a user to pick appropriate roles for something. More...
 
class  admin_setting_question_behaviour
 Admin setting that allows a user to pick a behaviour. More...
 
class  admin_setting_regradingcheckbox
 
class  admin_setting_requiredpasswordunmask
 This type of field should be used for mandatory config settings where setting password is required. More...
 
class  admin_setting_requiredtext
 This type of field should be used for mandatory config settings. More...
 
class  admin_setting_scsscode
 Used to validate the contents of SCSS code and ensuring they are parsable. More...
 
class  admin_setting_searchsetupinfo
 Search setup steps info. More...
 
class  admin_setting_servertimezone
 Server timezone setting. More...
 
class  admin_setting_sitesetcheckbox
 Special checkbox for frontpage - stores data in course table. More...
 
class  admin_setting_sitesetselect
 Special select for frontpage - stores data in course table. More...
 
class  admin_setting_sitesettext
 Special text for frontpage - stores data in course table. More...
 
class  admin_setting_special_adminseesall
 Special checkbox for calendar - resets SESSION vars. More...
 
class  admin_setting_special_backup_auto_destination
 Special setting for backup auto destination. More...
 
class  admin_setting_special_backupdays
 Special control for selecting days to backup. More...
 
class  admin_setting_special_calendar_weekend
 Special admin control. More...
 
class  admin_setting_special_coursecontact
 Which roles to show on course description page. More...
 
class  admin_setting_special_debug
 Special debug setting. More...
 
class  admin_setting_special_frontpagedesc
 Special text editor for site description. More...
 
class  admin_setting_special_gradebookroles
 Graded roles in gradebook. More...
 
class  admin_setting_special_gradeexport
 Primary grade export plugin - has state tracking. More...
 
class  admin_setting_special_gradelimiting
 
class  admin_setting_special_grademinmaxtouse
 Special setting for $CFG->grade_minmaxtouse. More...
 
class  admin_setting_special_gradepointdefault
 A setting for setting the default grade point value. More...
 
class  admin_setting_special_gradepointmax
 A setting for setting the maximum grade value. More...
 
class  admin_setting_special_registerauth
 Special class for register auth selection. More...
 
class  admin_setting_special_selectsetup
 Special select for settings that are altered in setup.php and can not be altered on the fly. More...
 
class  admin_setting_users_with_capability
 An admin setting for selecting one or more users who have a capability in the system context. More...
 
class  admin_setting_webservicesoverview
 Special class for overview of external services. More...
 
class  admin_settingdependency
 Used to store details of the dependency between two settings elements. More...
 
class  admin_settingpage
 Used to group a number of admin_setting objects into a page and add them to the admin tree. More...
 
class  admin_settings_country_select
 Selection of one of the recognised countries using the list returned by get_list_of_countries(). More...
 
class  admin_settings_coursecat_select
 Course category selection. More...
 
class  admin_settings_h5plib_handler_select
 Selection of plugins that can work as H5P libraries handlers. More...
 
class  admin_settings_num_course_sections
 admin_setting_configselect for the default number of sections in a course, simply so we can lazy-load the choices. More...
 
class  admin_settings_sitepolicy_handler_select
 Selection of plugins that can work as site policy handlers. More...
 
interface  parentable_part_of_admin_tree
 Interface implemented by any part_of_admin_tree that has children. More...
 
interface  part_of_admin_tree
 CLASS DEFINITIONS /////////////////////////////////////////////////////////. More...
 

Functions

 admin_apply_default_settings (?part_of_admin_tree $node=null, bool $unconditional=true)
 settings utility functions
 
 admin_critical_warnings_present ()
 Test if and critical warnings are present.
 
moodle_page 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.
 
 admin_find_write_settings ($node, $data)
 Internal recursive function - finds all settings from submitted form.
 
 admin_get_root ($reload=false, $requirefulltree=true)
 Returns the reference to admin tree root.
 
 admin_output_new_settings_by_page ($node)
 Internal function - returns arrays of html pages with uninitialised settings.
 
 admin_search_settings_html ($query)
 Internal function - prints the search results.
 
 admin_write_settings ($formdata)
 Store changed settings, this function updates the errors variable in $ADMIN.
 
 any_new_admin_settings ($node)
 Based on find_new_settings() in upgradesettings.php Looks to find any admin settings that have not been initialized.
 
 db_replace ($search, $replace, $additionalskiptables='')
 Moved from admin/replace.php so that we can use this in cron.
 
 db_should_replace ($table, $column='', $additionalskiptables='')
 Given a table and optionally a column name should replaces be done?
 
 drop_plugin_tables ($name, $file, $feedback=true)
 Delete all plugin tables.
 
 enable_cli_maintenance_mode ()
 Enables CLI maintenance mode by creating new dataroot/climaintenance.html file.
 
 format_admin_setting ($setting, $title='', $form='', $description='', $label=true, $warning='', $defaultinfo=NULL, $query='')
 Format admin settings.
 
 get_component_version ($component, $source='installed')
 Returns the version of installed component.
 
 get_db_directories ()
 Returns list of all directories where we expect install.xml files.
 
 get_used_table_names ()
 Returns names of all known tables == tables that moodle knows about.
 
 is_dataroot_insecure ($fetchtest=false)
 Try to verify that dataroot is not accessible from web.
 
 is_float_problem ()
 Detects if float supports at least 10 decimal digits.
 
 set_cron_lock ($name, $until, $ignorecurrent=false)
 Try to obtain or release the cron lock.
 
 uninstall_plugin ($type, $name)
 Automatically clean-up all plugin data and remove the plugin DB tables.
 

Variables

const INSECURE_DATAROOT_ERROR 2
 
const INSECURE_DATAROOT_WARNING 1
 Add libraries.