Permalink
Browse files

Merge branch 'MDL-36103_22' of git://github.com/timhunt/moodle into M…

…OODLE_22_STABLE
  • Loading branch information...
2 parents 5559703 + a9c7672 commit 15b3f4332662c431fe03a8d41e723705fe7f4c0e Sam Hemelryk committed Oct 29, 2012
Showing with 10 additions and 7 deletions.
  1. +10 −7 lib/tablelib.php
View
@@ -734,16 +734,19 @@ function format_row($row) {
function col_fullname($row) {
global $COURSE, $CFG;
- if (!$this->download) {
- $profileurl = new moodle_url('/user/profile.php', array('id' => $row->{$this->useridfield}));
- if ($COURSE->id != SITEID) {
- $profileurl->param('course', $COURSE->id);
- }
- return html_writer::link($profileurl, fullname($row));
+ $name = fullname($row);
+ if ($this->download) {
+ return $name;
+ }
+ $userid = $row->{$this->useridfield};
+ if ($COURSE->id == SITEID) {
+ $profileurl = new moodle_url('/user/profile.php', array('id' => $userid));
} else {
- return fullname($row);
+ $profileurl = new moodle_url('/user/view.php',
+ array('id' => $userid, 'course' => $COURSE->id));
}
+ return html_writer::link($profileurl, $name);
}
/**

0 comments on commit 15b3f43

Please sign in to comment.