MDL-54646 tags: Hide manage tags in menu if tags disabled.

This commit is contained in:
Tomasz Muras 2016-11-08 21:54:37 +01:00 committed by Jun Pataleta
parent 258d07d37e
commit ff1fc4d9f4

View File

@ -236,8 +236,11 @@ preferences,moodle|/user/preferences.php|preferences',
$temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1));
$ADMIN->add('appearance', $temp);
// link to tag management interface
$ADMIN->add('appearance', new admin_externalpage('managetags', new lang_string('managetags', 'tag'), $CFG->wwwroot.'/tag/manage.php', 'moodle/tag:manage'));
// Link to tag management interface.
$url = new moodle_url('/tag/manage.php');
$hidden = empty($CFG->usetags);
$page = new admin_externalpage('managetags', new lang_string('managetags', 'tag'), $url, 'moodle/tag:manage', $hidden);
$ADMIN->add('appearance', $page);
$temp = new admin_settingpage('additionalhtml', new lang_string('additionalhtml', 'admin'));
$temp->add(new admin_setting_heading('additionalhtml_heading', new lang_string('additionalhtml_heading', 'admin'), new lang_string('additionalhtml_desc', 'admin')));