Skip to content

Commit

Permalink
Merge branch 'MDL-59567-master' of https://github.com/mackensen/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jan 16, 2018
2 parents 5242a76 + 5976a78 commit 0881745
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blocks/mnet_hosts/block_mnet_hosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ function get_content() {

if ($hosts) {
foreach ($hosts as $host) {
$icon = $OUTPUT->pix_icon('i/'.$host->application.'_host', get_string('server', 'block_mnet_hosts')) . ' ';

if ($host->id == $USER->mnethostid) {
$this->content->items[]="<a title=\"" .s($host->name).
"\" href=\"{$host->wwwroot}\">".$icon. s($host->name) ."</a>";
$url = new \moodle_url($host->wwwroot);
} else {
$this->content->items[]="<a title=\"" .s($host->name).
"\" href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$host->id}\">" .$icon. s($host->name) ."</a>";
$url = new \moodle_url('/auth/mnet/jump.php', array('hostid' => $host->id));
}
$this->content->items[] = html_writer::tag('a',
$OUTPUT->pix_icon("i/{$host->application}_host", get_string('server', 'block_mnet_hosts')) . s($host->name),
array('href' => $url->out(), 'title' => s($host->name))
);
}
}

Expand Down

0 comments on commit 0881745

Please sign in to comment.