2009-11-01 10:32:02 +00:00
|
|
|
<?php
|
2006-09-03 13:10:56 +00:00
|
|
|
|
2006-09-25 18:21:59 +00:00
|
|
|
// This is the first file read by the lib/adminlib.php script
|
|
|
|
// We use it to create the categories in correct order,
|
|
|
|
// since they need to exist *before* settingpages and externalpages
|
|
|
|
// are added to them.
|
2006-09-03 13:10:56 +00:00
|
|
|
|
2012-07-23 14:33:02 +08:00
|
|
|
$systemcontext = context_system::instance();
|
2009-01-15 22:09:57 +00:00
|
|
|
$hassiteconfig = has_capability('moodle/site:config', $systemcontext);
|
2007-10-02 21:38:53 +00:00
|
|
|
|
2011-12-06 11:07:55 +13:00
|
|
|
$ADMIN->add('root', new admin_externalpage('adminnotifications', new lang_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
|
2006-09-25 18:21:59 +00:00
|
|
|
|
2012-06-04 19:22:06 +08:00
|
|
|
$ADMIN->add('root', new admin_externalpage('registrationmoodleorg', new lang_string('registration', 'admin'),
|
|
|
|
"$CFG->wwwroot/$CFG->admin/registration/register.php?huburl=" . HUB_MOODLEORGHUBURL . "&hubname=Moodle.org"));
|
|
|
|
$ADMIN->add('root', new admin_externalpage('registrationhub', new lang_string('registerwith', 'hub'),
|
2010-05-01 05:05:55 +00:00
|
|
|
"$CFG->wwwroot/$CFG->admin/registration/register.php", 'moodle/site:config', true));
|
2012-06-04 19:22:06 +08:00
|
|
|
$ADMIN->add('root', new admin_externalpage('registrationhubs', new lang_string('hubs', 'admin'),
|
|
|
|
"$CFG->wwwroot/$CFG->admin/registration/index.php", 'moodle/site:config', true));
|
2010-05-01 05:05:55 +00:00
|
|
|
$ADMIN->add('root', new admin_externalpage('siteregistrationconfirmed',
|
2011-12-06 11:07:55 +13:00
|
|
|
new lang_string('registrationconfirmed', 'hub'),
|
2010-05-01 05:05:55 +00:00
|
|
|
$CFG->wwwroot."/".$CFG->admin."/registration/confirmregistration.php", 'moodle/site:config', true));
|
2006-09-25 18:21:59 +00:00
|
|
|
// hidden upgrade script
|
2011-12-06 11:07:55 +13:00
|
|
|
$ADMIN->add('root', new admin_externalpage('upgradesettings', new lang_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
|
2006-09-25 18:21:59 +00:00
|
|
|
|
2008-08-26 05:45:07 +00:00
|
|
|
if ($hassiteconfig) {
|
2011-12-06 11:07:55 +13:00
|
|
|
$optionalsubsystems = new admin_settingpage('optionalsubsystems', new lang_string('advancedfeatures', 'admin'));
|
2008-08-26 05:45:07 +00:00
|
|
|
$ADMIN->add('root', $optionalsubsystems);
|
|
|
|
}
|
|
|
|
|
2011-12-06 11:07:55 +13:00
|
|
|
$ADMIN->add('root', new admin_category('users', new lang_string('users','admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('courses', new lang_string('courses','admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('grades', new lang_string('grades')));
|
2013-04-06 14:24:48 +13:00
|
|
|
$ADMIN->add('root', new admin_category('badges', new lang_string('badges'), empty($CFG->enablebadges)));
|
2011-12-06 11:07:55 +13:00
|
|
|
$ADMIN->add('root', new admin_category('location', new lang_string('location','admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('language', new lang_string('language')));
|
|
|
|
$ADMIN->add('root', new admin_category('modules', new lang_string('plugins', 'admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('security', new lang_string('security','admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('appearance', new lang_string('appearance','admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('frontpage', new lang_string('frontpage','admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('server', new lang_string('server','admin')));
|
|
|
|
$ADMIN->add('root', new admin_category('mnet', new lang_string('net','mnet'), (isset($CFG->mnet_dispatcher_mode) and $CFG->mnet_dispatcher_mode === 'off')));
|
|
|
|
$ADMIN->add('root', new admin_category('reports', new lang_string('reports')));
|
|
|
|
$ADMIN->add('root', new admin_category('development', new lang_string('development', 'admin')));
|
2008-11-26 19:27:39 +00:00
|
|
|
|
2006-09-25 20:22:55 +00:00
|
|
|
// hidden unsupported category
|
2011-12-06 11:07:55 +13:00
|
|
|
$ADMIN->add('root', new admin_category('unsupported', new lang_string('unsupported', 'admin'), true));
|
2008-11-26 19:27:39 +00:00
|
|
|
|
2007-12-19 17:35:20 +00:00
|
|
|
// hidden search script
|
2011-12-06 11:07:55 +13:00
|
|
|
$ADMIN->add('root', new admin_externalpage('search', new lang_string('searchresults'), "$CFG->wwwroot/$CFG->admin/search.php", 'moodle/site:config', true));
|