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.

This commit is contained in:
tjhunt 2007-03-28 16:57:22 +00:00
parent 43edb6269a
commit 71248ce89e
3 changed files with 6 additions and 3 deletions

View File

@ -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.

View File

@ -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

View File

@ -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';