Skip to content

Commit

Permalink
Merge branch 'wip-MDL-38129-master' of git://github.com/marinaglancy/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
andrewnicols committed Jul 24, 2017
2 parents 7b1c637 + 1ef14a5 commit 6807328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grade/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function init() {
LEFT JOIN (SELECT * FROM {user_info_data}
WHERE fieldid = :cf$customfieldscount) cf$customfieldscount
ON u.id = cf$customfieldscount.userid";
$userfields .= ", cf$customfieldscount.data AS customfield_{$field->shortname}";
$userfields .= ", cf$customfieldscount.data AS customfield_{$field->customid}";
$params['cf'.$customfieldscount] = $field->customid;
$customfieldscount++;
}
Expand Down Expand Up @@ -3191,7 +3191,7 @@ public static function get_plugins_export($courseid) {
*/
public static function get_user_field_value($user, $field) {
if (!empty($field->customid)) {
$fieldname = 'customfield_' . $field->shortname;
$fieldname = 'customfield_' . $field->customid;
if (!empty($user->{$fieldname}) || is_numeric($user->{$fieldname})) {
$fieldvalue = $user->{$fieldname};
} else {
Expand Down

0 comments on commit 6807328

Please sign in to comment.