diff --git a/admin/roles/allowassign.php b/admin/roles/allowassign.php index ebdeca7a7f2d0..b2685a13489a1 100755 --- a/admin/roles/allowassign.php +++ b/admin/roles/allowassign.php @@ -67,7 +67,7 @@ /// get all the roles identifier foreach ($roles as $role) { - $rolesname[] = $role->name; + $rolesname[] = format_string($role->name); $roleids[] = $role->id; $table->align[] = 'center'; $table->wrap[] = 'nowrap'; @@ -77,7 +77,7 @@ foreach ($roles as $role) { $beta = get_box_list($role->id, $roleids); - $table->data[] = array_merge(array($role->name), $beta); + $table->data[] = array_merge(array(format_string($role->name)), $beta); } print_simple_box(get_string('configallowassign', 'admin'), 'center'); diff --git a/admin/roles/allowoverride.php b/admin/roles/allowoverride.php index 4dcce9dab7482..7904208c62fb8 100755 --- a/admin/roles/allowoverride.php +++ b/admin/roles/allowoverride.php @@ -65,7 +65,7 @@ /// get all the roles identifier foreach ($roles as $role) { - $rolesname[] = $role->name; + $rolesname[] = format_string($role->name); $roleids[] = $role->id; $table->align[] = 'center'; $table->wrap[] = 'nowrap'; @@ -75,7 +75,7 @@ foreach ($roles as $role) { $beta = get_box_list($role->id, $roleids); - $table->data[] = array_merge(array($role->name), $beta); + $table->data[] = array_merge(array(format_string($role->name)), $beta); } print_simple_box(get_string('configallowoverride', 'admin'), 'center'); diff --git a/admin/roles/assign.html b/admin/roles/assign.html index 362560e4de0eb..3a7bb7facf962 100755 --- a/admin/roles/assign.html +++ b/admin/roles/assign.html @@ -9,9 +9,9 @@ print (''); } ?> - - - + + +
diff --git a/admin/roles/assign.php b/admin/roles/assign.php index 6f95aa9d991c1..739c8af61c56d 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -166,7 +166,7 @@ echo ''; } echo ''.$strroletoassign.': '; - choose_from_menu ($assignableroles, 'roleid', $roleid, 'choose', $script='rolesform.submit()'); + choose_from_menu ($assignableroles, 'roleid', $roleid, get_string('listallroles', 'role'), $script='rolesform.submit()'); echo ''; print_simple_box_start("center"); diff --git a/admin/roles/manage.html b/admin/roles/manage.html index bd85713beff88..bae0aca93cbb1 100755 --- a/admin/roles/manage.html +++ b/admin/roles/manage.html @@ -1,15 +1,23 @@ -
- - - -
Role Name: -  -Role short name (ASCII): -
Role Description: +htmleditor, 10, 50, 50, 10, 'description', "$role->description"); ?> + switch ($action) { + case 'add': $submitlabel = get_string('addrole', 'role'); break; + case 'edit': + default: $submitlabel = get_string('savechanges'); + } +?> + + + + + - +
+:   +: +
+: +description); ?>

@@ -30,8 +38,8 @@ foreach ($capabilities as $capability) { // prints a breaker if component or name or context level if ($capability->component != $component or $capability->contextlevel != $contextlevel) { - echo (''); + echo (''); } // these 2 are used to see to group same mod/core capabilities together @@ -47,10 +55,10 @@ - - - - + + + + - -
'. - get_component_string($capability->component, $capability->contextlevel).'
'. + get_component_string($capability->component, $capability->contextlevel).'
name); ?>permission) || $localoverride->permission==0){ echo 'checked="checked"'; }?>>permission) && $localoverride->permission==1){ echo 'checked="checked"'; }?>>permission) && $localoverride->permission==-1){ echo 'checked="checked"'; }?>>permission) && $localoverride->permission==-1000){ echo 'checked="checked"'; }?>>permission) || $localoverride->permission==0){ echo 'checked="checked"'; }?> />permission) && $localoverride->permission==1){ echo 'checked="checked"'; }?> />permission) && $localoverride->permission==-1){ echo 'checked="checked"'; }?> />permission) && $localoverride->permission==-1000){ echo 'checked="checked"'; }?> /> riskbitmask) { echo "T"; @@ -70,8 +78,9 @@ ?>
+ +

-
+
+ diff --git a/admin/roles/manage.php b/admin/roles/manage.php index 6679ee6f0bf08..7106bc49772f2 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -10,7 +10,7 @@ $roleid = optional_param('roleid', 0, PARAM_INT); // if set, we are editing a role $name = optional_param('name', '', PARAM_MULTILANG); // new role name $shortname = optional_param('shortname', '', PARAM_SAFEDIR); // new role shortname - $description = optional_param('description', '', PARAM_MULTILANG); // new role desc + $description = optional_param('description', '', PARAM_CLEAN); // new role desc $action = optional_param('action', '', PARAM_ALPHA); $confirm = optional_param('confirm', 0, PARAM_BOOL); @@ -148,13 +148,13 @@ } foreach ($roles as $rolex) { - $roleoptions[$rolex->id] = $rolex->name; + $roleoptions[$rolex->id] = format_string($rolex->name); } // prints a form to swap roles print ('
'); - print ('
'.get_string('selectrole').': '); - choose_from_menu ($roleoptions, 'roleid', $roleid, 'choose', $script='rolesform1.submit()'); + print ('
'.get_string('selectrole', 'role').': '); + choose_from_menu ($roleoptions, 'roleid', $roleid, get_string('listallroles', 'role'), $script='rolesform1.submit()'); print ('
'); // this is the array holding capabilities of this role sorted till this context @@ -163,10 +163,15 @@ // this is the available capabilities assignable in this context $capabilities = fetch_context_capabilities($sitecontext); + $usehtmleditor = can_use_html_editor(); print_simple_box_start(); include_once('manage.html'); print_simple_box_end(); + if ($usehtmleditor) { + use_html_editor('description'); + } + } else { $table = new object; @@ -188,7 +193,7 @@ foreach ($roles as $role) { - $table->data[] = array(''.$role->name.'', $role->description, ''.$strdelete.''); + $table->data[] = array(''.format_string($role->name).'', format_text($role->description, FORMAT_HTML), ''.$strdelete.''); } print_table($table); @@ -199,6 +204,5 @@ print_single_button('manage.php', $options, get_string('addrole', 'role'), 'POST'); } - use_html_editor('description'); admin_externalpage_print_footer($adminroot); ?> diff --git a/admin/roles/override.html b/admin/roles/override.html index a74662736860d..41f1b8aeee71c 100755 --- a/admin/roles/override.html +++ b/admin/roles/override.html @@ -1,6 +1,6 @@
- - + + '); @@ -61,28 +61,28 @@ > + if ($isdisabled) {echo 'disabled="disabled"';}?> /> > > + if ($isdisabled) {echo ' disabled="disabled"';}?> /> > > + if ($isdisabled) {echo ' disabled="disabled"';}?> /> > > + if ($isdisabled) {echo ' disabled="disabled"';}?> /> riskbitmask) { @@ -106,5 +106,5 @@
-
+
diff --git a/admin/roles/override.php b/admin/roles/override.php index 1cf0816ff05be..26e1bf6cdde7d 100755 --- a/admin/roles/override.php +++ b/admin/roles/override.php @@ -130,7 +130,7 @@ echo ''; } echo ''.$strroletooverride.': '; - choose_from_menu ($overridableroles, 'roleid', $roleid, 'choose', $script='rolesform.submit()'); + choose_from_menu ($overridableroles, 'roleid', $roleid, get_string('listallroles', 'role'), $script='rolesform.submit()'); echo '
'; $r_caps = role_context_capabilities($roleid, $context); @@ -145,7 +145,7 @@ print_simple_box_end(); } else { notice(get_string('nocapabilitiesincontext', 'role'), - $CFG->wwwroot.'/admin/roles/override.php?contextid='.$contextid); + $CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$contextid); } } else { // Print overview table diff --git a/course/groups-edit.html b/course/groups-edit.html index c3356774670ff..9c0f3bef324df 100755 --- a/course/groups-edit.html +++ b/course/groups-edit.html @@ -125,7 +125,7 @@
-
: +
:
diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index fe5c49ed83af2..1c94d66241554 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -1155,7 +1155,6 @@ $string['selectamodule'] = 'Please select an activity module'; $string['selectednowmove'] = '$a files selected for moving. Now go to the destination and press \'Move files to here\''; $string['selectnos'] = 'Select all \'no\''; -$string['selectrole'] = 'Select a Role'; $string['senddetails'] = 'Send my details via email'; $string['separateandconnected'] = 'Separate and Connected ways of knowing'; $string['serverlocaltime'] = 'Server\'s local time'; diff --git a/lang/en_utf8/role.php b/lang/en_utf8/role.php index e96ba7580e725..b9e90e762306f 100644 --- a/lang/en_utf8/role.php +++ b/lang/en_utf8/role.php @@ -13,6 +13,7 @@ $string['defineroles'] = 'Define roles'; $string['existingusers'] = '$a existing users'; $string['inherit'] = 'Inherit'; +$string['listallroles'] = 'List all roles...'; $string['manageroles'] = 'Manage roles'; $string['nocapabilitiesincontext'] = 'No capabilities available in this context'; $string['overrideroles'] = 'Override roles'; @@ -21,9 +22,14 @@ $string['potentialusers'] = '$a potential users'; $string['prevent'] = 'Prevent'; $string['prohibit'] = 'Prohibit'; +$string['risks'] = 'Risks'; +$string['roledescription'] = 'Role description'; +$string['rolename'] = 'Role name'; +$string['roleshortname'] = 'Role short name (ASCII)'; $string['roletoassign'] = 'Role to assign'; $string['roletooverride'] = 'Role to override'; $string['roles'] = 'Roles'; +$string['selectrole'] = 'Select a role'; $string['site:doanything'] = 'Allowed to do everything'; $string['legacy:guest'] = 'LEGACY ROLE: Guest'; @@ -39,7 +45,7 @@ $string['site:manageblocks'] = 'Manage site-level blocks'; $string['site:accessallgroups'] = 'Access all groups'; $string['site:viewfullnames'] = 'Always see full names of users'; -$string['site:trustcontent'] = 'Trust content is safe'; +$string['site:trustcontent'] = 'Trust submitted content'; $string['site:doclinks'] = 'Show links to offsite docs'; $string['site:viewreports'] = 'View reports'; $string['user:create'] = 'Create users';