mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-36103_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
3b5513528e
1 changed files with 12 additions and 9 deletions
|
@ -727,16 +727,19 @@ class flexible_table {
|
|||
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);
|
||||
$name = fullname($row);
|
||||
if ($this->download) {
|
||||
return $name;
|
||||
}
|
||||
return html_writer::link($profileurl, fullname($row));
|
||||
|
||||
$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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue