From 71248ce89ee8095ca3ed6696c31f676d45d5cbe9 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 28 Mar 2007 16:57:22 +0000 Subject: [PATCH] MDL-9061 - Only show global assign roles warning if you are assigning roles in the global context! Also, change name of admin menu entry to reduce confusion. Merged from MOODLE_18_STABLE. --- admin/roles/assign.php | 6 ++++-- admin/settings/users.php | 2 +- lang/en_utf8/role.php | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/roles/assign.php b/admin/roles/assign.php index fc21cc8fba..5bd81642e1 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -210,8 +210,10 @@ print_heading_with_help(get_string('assignroles', 'role'), 'assignroles'); } - print_simple_box(get_string('globalroleswarning', 'role'), 'center', '700'); - + if ($context->contextlevel==CONTEXT_SYSTEM) { + print_box(get_string('globalroleswarning', 'role')); + } + if ($roleid) { /// prints a form to swap roles /// Get all existing participants in this context. diff --git a/admin/settings/users.php b/admin/settings/users.php index 89019cbd0b..8ea22652d5 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -23,7 +23,7 @@ $ADMIN->add('accounts', new admin_externalpage('profilefields', get_string('prof $ADMIN->add('users', new admin_category('roles', get_string('permissions', 'role'))); $ADMIN->add('roles', new admin_externalpage('defineroles', get_string('defineroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/manage.php")); $sitecontext = get_context_instance(CONTEXT_SYSTEM); -$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id)); +$ADMIN->add('roles', new admin_externalpage('assignroles', get_string('assignglobalroles', 'role'), "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=" . $sitecontext->id)); // "userpolicies" settingpage diff --git a/lang/en_utf8/role.php b/lang/en_utf8/role.php index e6a97f01b3..0fc53ab3c2 100644 --- a/lang/en_utf8/role.php +++ b/lang/en_utf8/role.php @@ -7,6 +7,7 @@ $string['allow'] = 'Allow'; $string['allowassign'] = 'Allow role assignments'; $string['allowoverride'] = 'Allow role overrides'; $string['assignroles'] = 'Assign roles'; +$string['assignglobalroles'] = 'Assign global roles'; $string['blog:create'] = 'Create new blog entries'; $string['blog:manageentries'] = 'Edit and manage entries'; $string['blog:manageofficialtags'] = 'Manage official tags'; -- 2.39.5