Merge branch 'MD-31803' of git://github.com/mouneyrac/moodle
[moodle.git] / admin / settings / top.php
CommitLineData
11b749ca 1<?php
50999a0b 2
c0a1aae3 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.
50999a0b 7
8e5da17a 8$systemcontext = get_context_instance(CONTEXT_SYSTEM);
18818abf 9$hassiteconfig = has_capability('moodle/site:config', $systemcontext);
8e5da17a 10
e106013f 11$ADMIN->add('root', new admin_externalpage('adminnotifications', new lang_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
c0a1aae3 12
b3245b75
DP
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'),
07ab0c80 16 "$CFG->wwwroot/$CFG->admin/registration/register.php", 'moodle/site:config', true));
b3245b75
DP
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));
07ab0c80 19$ADMIN->add('root', new admin_externalpage('siteregistrationconfirmed',
e106013f 20 new lang_string('registrationconfirmed', 'hub'),
07ab0c80 21 $CFG->wwwroot."/".$CFG->admin."/registration/confirmregistration.php", 'moodle/site:config', true));
c0a1aae3 22 // hidden upgrade script
e106013f 23$ADMIN->add('root', new admin_externalpage('upgradesettings', new lang_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
c0a1aae3 24
90658eef 25if ($hassiteconfig) {
e106013f 26 $optionalsubsystems = new admin_settingpage('optionalsubsystems', new lang_string('advancedfeatures', 'admin'));
90658eef 27 $ADMIN->add('root', $optionalsubsystems);
28}
29
e106013f
SH
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('location', new lang_string('location','admin')));
34$ADMIN->add('root', new admin_category('language', new lang_string('language')));
35$ADMIN->add('root', new admin_category('modules', new lang_string('plugins', 'admin')));
36$ADMIN->add('root', new admin_category('security', new lang_string('security','admin')));
37$ADMIN->add('root', new admin_category('appearance', new lang_string('appearance','admin')));
38$ADMIN->add('root', new admin_category('frontpage', new lang_string('frontpage','admin')));
39$ADMIN->add('root', new admin_category('server', new lang_string('server','admin')));
40$ADMIN->add('root', new admin_category('mnet', new lang_string('net','mnet'), (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode === 'off')));
41$ADMIN->add('root', new admin_category('reports', new lang_string('reports')));
42$ADMIN->add('root', new admin_category('development', new lang_string('development', 'admin')));
d994ced2 43
c9a49cea 44// hidden unsupported category
e106013f 45$ADMIN->add('root', new admin_category('unsupported', new lang_string('unsupported', 'admin'), true));
d994ced2 46
220a90c5 47// hidden search script
e106013f 48$ADMIN->add('root', new admin_externalpage('search', new lang_string('searchresults'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));