MDL-28471 Further tweaks to the question flag code.
[moodle.git] / admin / settings / top.php
blob4fcb0c9f9bf4c823006e6f82ccd13b625e919882
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 = get_context_instance(CONTEXT_SYSTEM);
9 $hassiteconfig = has_capability('moodle/site:config', $systemcontext);
11 $ADMIN->add('root', new admin_externalpage('adminnotifications', get_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
13 $ADMIN->add('root', new admin_externalpage('registrationindex', get_string('registration','admin'),
14 "$CFG->wwwroot/$CFG->admin/registration/index.php"));
15 $ADMIN->add('root', new admin_externalpage('registration', get_string('registeron','hub'),
16 "$CFG->wwwroot/$CFG->admin/registration/register.php", 'moodle/site:config', true));
17 $ADMIN->add('root', new admin_externalpage('registrationselector', get_string('registeron','hub'),
18 "$CFG->wwwroot/$CFG->admin/registration/hubselector.php", 'moodle/site:config', true));
19 $ADMIN->add('root', new admin_externalpage('siteregistrationconfirmed',
20 get_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', get_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
25 if ($hassiteconfig) {
26 $optionalsubsystems = new admin_settingpage('optionalsubsystems', get_string('advancedfeatures', 'admin'));
27 $ADMIN->add('root', $optionalsubsystems);
30 $ADMIN->add('root', new admin_category('users', get_string('users','admin')));
31 $ADMIN->add('root', new admin_category('courses', get_string('courses','admin')));
32 $ADMIN->add('root', new admin_category('grades', get_string('grades')));
33 $ADMIN->add('root', new admin_category('location', get_string('location','admin')));
34 $ADMIN->add('root', new admin_category('language', get_string('language')));
35 $ADMIN->add('root', new admin_category('modules', get_string('plugins', 'admin')));
36 $ADMIN->add('root', new admin_category('security', get_string('security','admin')));
37 $ADMIN->add('root', new admin_category('appearance', get_string('appearance','admin')));
38 $ADMIN->add('root', new admin_category('frontpage', get_string('frontpage','admin')));
39 $ADMIN->add('root', new admin_category('server', get_string('server','admin')));
40 $ADMIN->add('root', new admin_category('mnet', get_string('net','mnet'), (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode === 'off')));
41 $ADMIN->add('root', new admin_category('reports', get_string('reports')));
42 $ADMIN->add('root', new admin_category('development', get_string('development', 'admin')));
44 // hidden unsupported category
45 $ADMIN->add('root', new admin_category('unsupported', get_string('unsupported', 'admin'), true));
47 // hidden search script
48 $ADMIN->add('root', new admin_externalpage('search', get_string('searchresults'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));