Skip to content

Commit

Permalink
Merge branch 'wip-mdl-39110-m24' of git://github.com/rajeshtaneja/moo…
Browse files Browse the repository at this point in the history
…dle into MOODLE_24_STABLE
  • Loading branch information
danpoltawski committed Apr 17, 2013
2 parents 464ab78 + 1f02e15 commit ea4841f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions user/filters/courserole.php
Expand Up @@ -132,8 +132,8 @@ function get_label($data) {
$a->label = $this->_label; $a->label = $this->_label;


if ($roleid) { if ($roleid) {
$rolename = $DB->get_field('role', 'name', array('id'=>$roleid)); $role = $DB->get_record('role', array('id'=>$roleid));
$a->rolename = '"'.format_string($rolename).'"'; $a->rolename = '"'.role_get_name($role).'"';
} else { } else {
$a->rolename = get_string('anyrole', 'filters'); $a->rolename = get_string('anyrole', 'filters');
} }
Expand Down
5 changes: 3 additions & 2 deletions user/filters/globalrole.php
Expand Up @@ -78,11 +78,12 @@ function get_sql_filter($data) {
function get_label($data) { function get_label($data) {
global $DB; global $DB;


$rolename = $DB->get_field('role', 'name', array('id'=>$data['value'])); $role = $DB->get_record('role', array('id'=>$data['value']));



$a = new stdClass(); $a = new stdClass();
$a->label = $this->_label; $a->label = $this->_label;
$a->value = '"'.format_string($rolename).'"'; $a->value = '"'.role_get_name($role).'"';


return get_string('globalrolelabel', 'filters', $a); return get_string('globalrolelabel', 'filters', $a);
} }
Expand Down

0 comments on commit ea4841f

Please sign in to comment.