Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…OODLE_23_STABLE
  • Loading branch information...
commit 3b5513528eb2c1bedbc55c158b76eccc7f7c0c8a 2 parents 33407de + 2878842
@samhemelryk samhemelryk authored
Showing with 10 additions and 7 deletions.
  1. +10 −7 lib/tablelib.php
View
17 lib/tablelib.php
@@ -727,16 +727,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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.