MDL-8522 better label for role reset button and confirmation text; merged from MOODLE_18_STABLE

This commit is contained in:
skodak 2007-03-14 22:07:59 +00:00
parent d927621bf3
commit 9d200a16d7
3 changed files with 10 additions and 3 deletions

View File

@ -125,7 +125,7 @@ if (!empty($role->legacytype)) {
foreach ($capabilities as $capability) {
//legacy caps have their own selector
if (strpos($capability->name, 'moodle/legacy:') === 0 ) {
if (islegacy($capability->name)) {
continue;
}

View File

@ -440,12 +440,17 @@
echo '<div class="buttons">';
$legacytype = get_legacy_type($roleid);
$options = array();
$options['roleid'] = $roleid;
$options['action'] = 'edit';
print_single_button('manage.php', $options, get_string('edit'));
$options['action'] = 'reset';
print_single_button('manage.php', $options, get_string('reset'));
if (empty($legacytype)) {
print_single_button('manage.php', $options, get_string('resetrolenolegacy', 'role'));
} else {
print_single_button('manage.php', $options, get_string('resetrole', 'role'));
}
$options['action'] = 'duplicate';
print_single_button('manage.php', $options, get_string('duplicaterole', 'role'));
print_single_button('manage.php', null, get_string('listallroles', 'role'));

View File

@ -81,8 +81,10 @@ $string['question:export'] = 'Export questions';
$string['question:import'] = 'Import questions';
$string['question:manage'] = 'Manage questions';
$string['question:managecategory'] = 'Manage question category';
$string['resetrole'] = 'Reset to defaults';
$string['resetrolenolegacy'] = 'Clear permissions';
$string['resetrolesure'] = 'Are you sure that you want to reset role \"$a->name ($a->shortname)\" to defaults?<p></p>The defaults are taken from the selected legacy capability ($a->legacytype).';
$string['resetrolesurenolegacy'] = 'Are you sure that you want to removed all permissions defined in this role \"$a->name ($a->shortname)\"?';
$string['resetrolesurenolegacy'] = 'Are you sure that you want to clear all permissions defined in this role \"$a->name ($a->shortname)\"?';
$string['risks'] = 'Risks';
$string['role:assign'] = 'Assign roles to users';
$string['role:manage'] = 'Create and manage roles';