mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
rating MDL-21657 updated aliasing and unaliasing of the fields returned by user_picture::fields
This commit is contained in:
parent
c538a23d9d
commit
61b0070857
@ -78,12 +78,12 @@ if (!$ratings) {
|
||||
echo "<th class=\"header\" scope=\"col\" style=\"width:100%\"><a href=\"report.php?id=$itemid&sort=rating\">$strrating</a></th>";
|
||||
echo "<th class=\"header\" scope=\"col\"><a href=\"report.php?id=$itemid&sort=time\">$strtime</a></th>";
|
||||
echo "</tr>";
|
||||
$user = null;
|
||||
|
||||
foreach ($ratings as $rating) {
|
||||
//undo the aliasing necessary for user_picture::fields
|
||||
$user = clone($rating);//could get away with just overwriting rating->id and not cloning
|
||||
//the rating object as we don't use rating->id again. That just seems like a bad idea.
|
||||
$user->id = $user->uid;
|
||||
//Undo the aliasing of the user id column from user_picture::fields()
|
||||
//we could clone the rating object or preserve the rating id if we needed it again
|
||||
//but we don't
|
||||
$rating->id = $rating->uid;
|
||||
|
||||
echo '<tr class="ratingitemheader">';
|
||||
echo "<td>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user