Merge branch 'wip-MDL-53798-master' of https://github.com/marinaglancy/moodle
authorDan Poltawski <dan@moodle.com>
Wed, 20 Apr 2016 10:09:48 +0000 (11:09 +0100)
committerDan Poltawski <dan@moodle.com>
Wed, 20 Apr 2016 10:09:48 +0000 (11:09 +0100)
search/classes/document.php

index 985f85d..c7cdb6d 100644 (file)
@@ -563,7 +563,7 @@ class document implements \renderable, \templatable {
 
         $title = $this->is_set('title') ? $this->format_text($this->get('title')) : '';
         $data = [
-            'courseurl' => new \moodle_url('/course/view.php?id=' . $this->get('courseid')),
+            'courseurl' => course_get_url($this->get('courseid')),
             'coursefullname' => format_string($this->get('coursefullname'), true, array('context' => $this->get('contextid'))),
             'modified' => userdate($this->get('modified')),
             'title' => ($title !== '') ? $title : get_string('notitle', 'search'),