MDL-38055 block_courseoverview: fixed formatting of course fullname

Conflicts:
	blocks/course_overview/renderer.php
This commit is contained in:
Sam Hemelryk
2013-03-04 09:35:17 +13:00
parent 498ee7d44b
commit 6013e16b25
+4 -3
View File
@@ -104,11 +104,12 @@ class block_course_overview_renderer extends plugin_renderer_base {
$html .= html_writer::end_tag('div');
}
$attributes = array('title' => s($course->fullname));
$context = context_course::instance($course->id);
$fullname = format_string($course->fullname, true, array('context' => $context));
$attributes = array('title' => str_replace('&', '&', $fullname));
if ($course->id > 0) {
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
$coursefullname = format_string($course->fullname, true, $course->id);
$link = html_writer::link($courseurl, $coursefullname, $attributes);
$link = html_writer::link($courseurl, $fullname, $attributes);
$html .= $this->output->heading($link, 2, 'title');
} else {
$html .= $this->output->heading(html_writer::link(