Skip to content

Commit

Permalink
MDL-45623: Fix assigned users count on role delete confirmation page
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncoggins committed May 19, 2014
1 parent a929fd5 commit 9811cb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/roles/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid));
$a->count = $DB->count_records_select('role_assignments',
'roleid = ?', array($roleid), 'COUNT(DISTINCT userid)');

$formcontinue = new single_button(new moodle_url($baseurl, $optionsyes), get_string('yes'));
$formcancel = new single_button(new moodle_url($baseurl), get_string('no'), 'get');
Expand Down

0 comments on commit 9811cb6

Please sign in to comment.