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 21, 2014
1 parent ba05f57 commit c017cc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/roles/manage.php
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 c017cc5

Please sign in to comment.