Merge branch 'MDL-36103_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE

This commit is contained in:
Sam Hemelryk 2012-10-30 12:51:44 +13:00
commit 3b5513528e

View file

@ -727,16 +727,19 @@ class flexible_table {
function col_fullname($row) { function col_fullname($row) {
global $COURSE, $CFG; global $COURSE, $CFG;
if (!$this->download) { $name = fullname($row);
$profileurl = new moodle_url('/user/profile.php', array('id' => $row->{$this->useridfield})); if ($this->download) {
if ($COURSE->id != SITEID) { return $name;
$profileurl->param('course', $COURSE->id);
}
return html_writer::link($profileurl, fullname($row));
} else {
return fullname($row);
} }
$userid = $row->{$this->useridfield};
if ($COURSE->id == SITEID) {
$profileurl = new moodle_url('/user/profile.php', array('id' => $userid));
} else {
$profileurl = new moodle_url('/user/view.php',
array('id' => $userid, 'course' => $COURSE->id));
}
return html_writer::link($profileurl, $name);
} }
/** /**