mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Merge branch 'w28_MDL-8249_m24_roletranslations' of git://github.com/skodak/moodle
Conflicts: lib/db/upgrade.php version.php
This commit is contained in:
commit
e1980f8bb9
37 changed files with 631 additions and 422 deletions
|
@ -38,7 +38,7 @@ $roleids = optional_param_array('roles', array('0'), PARAM_INTEGER);
|
|||
|
||||
// Clean the passed in list of role ids. If 'All' selected as an option, or
|
||||
// if none were selected, do all roles.
|
||||
$allroles = get_all_roles();
|
||||
$allroles = role_fix_names(get_all_roles());
|
||||
$cleanedroleids = array();
|
||||
foreach ($roleids as $roleid) {
|
||||
if ($roleid == 0) {
|
||||
|
@ -73,7 +73,7 @@ foreach ($allcapabilities as $cap) {
|
|||
// Prepare the list of roles to choose from
|
||||
$rolechoices = array('0' => get_string('all'));
|
||||
foreach ($allroles as $role) {
|
||||
$rolechoices[$role->id] = $role->name;
|
||||
$rolechoices[$role->id] = $role->localname;
|
||||
}
|
||||
if (count($cleanedroleids) == count($allroles)) {
|
||||
// Select 'All', rather than each role individually.
|
||||
|
@ -162,7 +162,7 @@ if ($capability) {
|
|||
if (count($cleanedroleids) != count($allroles)) {
|
||||
$rolenames = array();
|
||||
foreach ($cleanedroleids as $roleid) {
|
||||
$rolenames[] = $allroles[$roleid]->name;
|
||||
$rolenames[] = $allroles[$roleid]->localname;
|
||||
}
|
||||
echo '<p>', get_string('forroles', 'tool_capability', implode(', ', $rolenames)), '</p>';
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ function print_report_tree($contextid, $contexts, $allroles) {
|
|||
foreach ($allroles as $role) {
|
||||
if (isset($contexts[$contextid]->rolecapabilities[$role->id])) {
|
||||
$permission = $contexts[$contextid]->rolecapabilities[$role->id];
|
||||
echo '<tr class="r' . ($rowcounter % 2) . '"><th class="cell">', $role->name,
|
||||
echo '<tr class="r' . ($rowcounter % 2) . '"><th class="cell">', $role->localname,
|
||||
'</th><td class="cell">' . $strpermissions[$permission] . '</td></tr>';
|
||||
$rowcounter++;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ if (!$problems) {
|
|||
$data = array();
|
||||
foreach ($problems as $problem) {
|
||||
$levelname = get_contextlevel_name($problem->contextlevel);
|
||||
$rolename = format_string($roles[$problem->roleid]->name);
|
||||
$rolename = role_get_name($roles[$problem->roleid]);
|
||||
//TODO: show list of users if count low
|
||||
$count = $problem->racount;
|
||||
$edit = array();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue