Merge branch 'master_MDL-45623' of git://github.com/totara/moodle

This commit is contained in:
Sam Hemelryk 2014-05-26 09:58:48 +12:00
commit bba9c3bcf8

View File

@ -75,7 +75,8 @@ switch ($action) {
$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');