MDL-54042 user: Fix debugging in core_user_get_users_by_field

The course object returned by enrol_get_all_users_courses does not include the defaultgroupingid.

This course object is passed to user_get_user_details - which does need
the defaultgroupingid.

All the other group info is returned (groupmode) etc - so it makes sense to also return this extra field.
This commit is contained in:
Damyon Wiese 2016-05-05 15:15:58 +08:00 committed by Dan Poltawski
parent 1e72daa899
commit 8eb15a38ef

View File

@ -789,6 +789,7 @@ function enrol_get_all_users_courses($userid, $onlyactive = false, $fields = NUL
$basefields = array('id', 'category', 'sortorder',
'shortname', 'fullname', 'idnumber',
'startdate', 'visible',
'defaultgroupingid',
'groupmode', 'groupmodeforce');
if (empty($fields)) {