Merge branch 'MDL-77272-main' of https://github.com/SergioComeron/moodle
[moodle.git] / admin / settings / top.php
blob3161059a587e523fb0423684f6962a077e4b9bea
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 new moodle_url("/admin/registration/index.php")));
15 // hidden upgrade script
16 $ADMIN->add('root', new admin_externalpage('upgradesettings', new lang_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
17 $userfeedback = new admin_settingpage('userfeedback', new lang_string('feedbacksettings', 'admin'));
18 $ADMIN->add('root', $userfeedback);
20 if ($hassiteconfig) {
21 $optionalsubsystems = new admin_settingpage('optionalsubsystems', new lang_string('advancedfeatures', 'admin'));
22 $ADMIN->add('root', $optionalsubsystems);
25 $ADMIN->add('root', new admin_category('users', new lang_string('users','admin')));
26 $ADMIN->add('root', new admin_category('courses', new lang_string('courses','admin')));
27 $ADMIN->add('root', new admin_category('grades', new lang_string('grades')));
28 $ADMIN->add('root', new admin_category('analytics', new lang_string('analytics', 'analytics')));
29 $ADMIN->add('root', new admin_category('competencies', new lang_string('competencies', 'core_competency')));
30 $ADMIN->add('root', new admin_category('badges', new lang_string('badges'), empty($CFG->enablebadges)));
31 $ADMIN->add('root', new admin_category('h5p', new lang_string('h5p', 'core_h5p')));
32 $ADMIN->add('root', new admin_category('license', new lang_string('license')));
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('messaging', new lang_string('messagingcategory', 'admin')));
36 $ADMIN->add('root', new admin_category('payment', new lang_string('payments', 'payment')));
37 $ADMIN->add('root', new admin_category('modules', new lang_string('plugins', 'admin')));
38 $ADMIN->add('root', new admin_category('security', new lang_string('security','admin')));
39 $ADMIN->add('root', new admin_category('appearance', new lang_string('appearance','admin')));
40 $ADMIN->add('root', new admin_category('frontpage', new lang_string('frontpage','admin')));
41 $ADMIN->add('root', new admin_category('server', new lang_string('server','admin')));
42 $ADMIN->add('root', new admin_category('mnet', new lang_string('net','mnet'), (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode === 'off')));
43 $ADMIN->add('root', new admin_category('reports', new lang_string('reports')));
44 $ADMIN->add('root', new admin_category('development', new lang_string('development', 'admin')));
46 // hidden unsupported category
47 $ADMIN->add('root', new admin_category('unsupported', new lang_string('unsupported', 'admin'), true));
49 // hidden search script
50 $ADMIN->add('root', new admin_externalpage('search', new lang_string('search', 'admin'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:configview', true));