MDL-35608 Completion status block - use html_writer::link
authorDamyon Wiese <damyon@moodle.com>
Tue, 9 Apr 2013 05:55:18 +0000 (13:55 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 9 Apr 2013 05:59:48 +0000 (13:59 +0800)
Just changing 2 calls from html_writer::tag to html_writer::link.

blocks/completionstatus/block_completionstatus.php

index e8a8389..e92f1bc 100644 (file)
@@ -236,7 +236,7 @@ class block_completionstatus extends block_base {
             // 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::tag('a', get_string('moredetails', 'completion'), array('href'=>$details->out()));
+            $this->content->footer = html_writer::link($details, get_string('moredetails', 'completion'));
         } else {
             // If user is not enrolled, show error.
             $this->content->text = get_string('nottracked', 'completion');
@@ -245,8 +245,7 @@ class block_completionstatus extends block_base {
         if (has_capability('report/completion:view', $context)) {
             $report = new moodle_url('/report/completion/index.php', array('course' => $course->id));
             $this->content->footer .= html_writer::empty_tag('br');
-            $this->content->footer .= html_writer::tag('a', get_string('viewcoursereport', 'completion'),
-                    array('href'=>$report->out()));
+            $this->content->footer .= html_writer::link($report, get_string('viewcoursereport', 'completion'));
         }
 
         return $this->content;