1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-23 09:23:09 +02:00

Merge branch 'MDL-53996-master' of git://github.com/junpataleta/moodle

This commit is contained in:
David Monllao 2016-05-02 10:51:59 +08:00
commit 74995620ca

@ -66,14 +66,17 @@ class block_lp extends block_base {
return $this->content;
}
$summary = new \block_lp\output\summary();
if (!$summary->has_content()) {
return $this->content;
}
// Block needs a valid, non-guest user to be logged-in in order to display the user's learning plans.
if (isloggedin() && !isguestuser()) {
$summary = new \block_lp\output\summary();
if (!$summary->has_content()) {
return $this->content;
}
$renderer = $this->page->get_renderer('block_lp');
$this->content->text = $renderer->render($summary);
$this->content->footer = '';
$renderer = $this->page->get_renderer('block_lp');
$this->content->text = $renderer->render($summary);
$this->content->footer = '';
}
return $this->content;
}