Merge branch 'MDL-49143-master' of git://github.com/cameron1729/moodle
[moodle.git] / admin / settings / top.php
blob768d28709dd51546562b1431a8ae6a4679588e2e
1 <?php
3 // This is the first file read by the lib/adminlib.php script
4 // We use it to create the categories in correct order,
5 // since they need to exist *before* settingpages and externalpages
6 // are added to them.
8 $systemcontext = context_system::instance();
9 $hassiteconfig = has_capability('moodle/site:config', $systemcontext);
11 $ADMIN->add('root', new admin_externalpage('adminnotifications', new lang_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
13 $ADMIN->add('root', new admin_externalpage('registrationmoodleorg', new lang_string('registration', 'admin'),
14 "$CFG->wwwroot/$CFG->admin/registration/register.php?huburl=" . HUB_MOODLEORGHUBURL . "&hubname=Moodle.org"));
15 $ADMIN->add('root', new admin_externalpage('registrationhub', new lang_string('registerwith', 'hub'),
16 "$CFG->wwwroot/$CFG->admin/registration/register.php", 'moodle/site:config', true));
17 $ADMIN->add('root', new admin_externalpage('registrationhubs', new lang_string('hubs', 'admin'),
18 "$CFG->wwwroot/$CFG->admin/registration/index.php", 'moodle/site:config', true));
19 $ADMIN->add('root', new admin_externalpage('siteregistrationconfirmed',
20 new lang_string('registrationconfirmed', 'hub'),
21 $CFG->wwwroot."/".$CFG->admin."/registration/confirmregistration.php", 'moodle/site:config', true));
22 // hidden upgrade script
23 $ADMIN->add('root', new admin_externalpage('upgradesettings', new lang_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
25 if ($hassiteconfig) {
26 $optionalsubsystems = new admin_settingpage('optionalsubsystems', new lang_string('advancedfeatures', 'admin'));
27 $ADMIN->add('root', $optionalsubsystems);
30 $ADMIN->add('root', new admin_category('users', new lang_string('users','admin')));
31 $ADMIN->add('root', new admin_category('courses', new lang_string('courses','admin')));
32 $ADMIN->add('root', new admin_category('grades', new lang_string('grades')));
33 $ADMIN->add('root', new admin_category('badges', new lang_string('badges'), empty($CFG->enablebadges)));
34 $ADMIN->add('root', new admin_category('location', new lang_string('location','admin')));
35 $ADMIN->add('root', new admin_category('language', new lang_string('language')));
36 $ADMIN->add('root', new admin_category('modules', new lang_string('plugins', 'admin')));
37 $ADMIN->add('root', new admin_category('security', new lang_string('security','admin')));
38 $ADMIN->add('root', new admin_category('appearance', new lang_string('appearance','admin')));
39 $ADMIN->add('root', new admin_category('frontpage', new lang_string('frontpage','admin')));
40 $ADMIN->add('root', new admin_category('server', new lang_string('server','admin')));
41 $ADMIN->add('root', new admin_category('mnet', new lang_string('net','mnet'), (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode === 'off')));
42 $ADMIN->add('root', new admin_category('reports', new lang_string('reports')));
43 $ADMIN->add('root', new admin_category('development', new lang_string('development', 'admin')));
45 // hidden unsupported category
46 $ADMIN->add('root', new admin_category('unsupported', new lang_string('unsupported', 'admin'), true));
48 // hidden search script
49 $ADMIN->add('root', new admin_externalpage('search', new lang_string('searchresults'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));