From 7cb4fb6a887131ce26f48e4a560a80082b4e8a7a Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 28 Mar 2007 16:57:45 +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. Backported from MOODLE_18_STABLE. --- admin/roles/assign.php | 5 ++++- admin/settings/users.php | 2 +- lang/en_utf8/role.php | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/admin/roles/assign.php b/admin/roles/assign.php index ea38e2eca7d..4fcc58c8415 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -197,7 +197,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 diff --git a/admin/settings/users.php b/admin/settings/users.php index d5effe4b3f8..2ec3fcc5651 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -17,7 +17,7 @@ $ADMIN->add('accounts', new admin_externalpage('uploadusers', get_string('upload $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 7455399ad65..acdc1a1a9a3 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';