mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'MDL-65042-master' of git://github.com/jleyva/moodle
This commit is contained in:
commit
ebd30140dc
1 changed files with 8 additions and 6 deletions
|
@ -146,18 +146,20 @@ class core_rating_external extends external_api {
|
||||||
$rating->rating = $maxrating;
|
$rating->rating = $maxrating;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The rating object has all the required fields for generating the picture url.
|
|
||||||
$userpicture = new user_picture($rating);
|
|
||||||
$userpicture->size = 1; // Size f1.
|
|
||||||
$profileimageurl = $userpicture->get_url($PAGE)->out(false);
|
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
$result['id'] = $rating->id;
|
$result['id'] = $rating->id;
|
||||||
$result['userid'] = $rating->userid;
|
$result['userid'] = $rating->userid;
|
||||||
$result['userpictureurl'] = $profileimageurl;
|
|
||||||
$result['userfullname'] = fullname($rating);
|
$result['userfullname'] = fullname($rating);
|
||||||
$result['rating'] = $scalemenu[$rating->rating];
|
$result['rating'] = $scalemenu[$rating->rating];
|
||||||
$result['timemodified'] = $rating->timemodified;
|
$result['timemodified'] = $rating->timemodified;
|
||||||
|
|
||||||
|
// The rating object has all the required fields for generating the picture url.
|
||||||
|
// Undo the aliasing of the user id column from user_picture::fields().
|
||||||
|
$rating->id = $rating->userid;
|
||||||
|
$userpicture = new user_picture($rating);
|
||||||
|
$userpicture->size = 1; // Size f1.
|
||||||
|
$result['userpictureurl'] = $userpicture->get_url($PAGE)->out(false);
|
||||||
|
|
||||||
$results[] = $result;
|
$results[] = $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue