Skip to content

Commit

Permalink
MDL-45172 block_completionstatus: added a check for an empty string b…
Browse files Browse the repository at this point in the history
…efore appending
  • Loading branch information
andyjdavis committed Apr 23, 2014
1 parent a046134 commit 40d2301
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blocks/completionstatus/block_completionstatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ public function get_content() {

// Display link to detailed view.
$details = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id));
$this->content->footer = html_writer::empty_tag('br');
$this->content->footer = html_writer::link($details, get_string('moredetails', 'completion'));
} else {
// If user is not enrolled, show error.
Expand All @@ -243,6 +242,9 @@ public function get_content() {

if (has_capability('report/completion:view', $context)) {
$report = new moodle_url('/report/completion/index.php', array('course' => $course->id));
if (empty($this->content->footer)) {
$this->content->footer = '';
}
$this->content->footer .= html_writer::empty_tag('br');
$this->content->footer .= html_writer::link($report, get_string('viewcoursereport', 'completion'));
}
Expand Down

0 comments on commit 40d2301

Please sign in to comment.