Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…OODLE_22_STABLE
  • Loading branch information...
commit 15b3f4332662c431fe03a8d41e723705fe7f4c0e 2 parents 5559703 + a9c7672
@samhemelryk samhemelryk authored
Showing with 10 additions and 7 deletions.
  1. +10 −7 lib/tablelib.php
View
17 lib/tablelib.php
@@ -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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.