Actually, since the fix for MDL-12331, which changed the get_users_by_capability call at the top of this function, the check it was doing is entirely redundant anyway, so I removed it.
Merged from MOODLE_19_STABLE.
$answer = $answers[$user->id];
$useranswer[(int)$answer->optionid][] = $user;
} else {
- $usershownotans = get_users_by_capability($context, 'mod/choice:choose', 'u.id', 'u.id ASC', '', '', $currentgroup, '', false);
- if ($user->id == $usershownotans[$user->id]->id) {
- $useranswer[0][] = $user;
- }
+ $useranswer[0][] = $user;
}
}
}