Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'wip-MDL-38055-m24' of git://github.com/samhemelryk/mood…

…le into MOODLE_24_STABLE
  • Loading branch information...
commit 20d52c6b9c57f2b83342a0d2d6cdc46281d23168 2 parents d203a50 + fb3ff98
@damyon damyon authored
Showing with 6 additions and 2 deletions.
  1. +2 −1  blocks/course_overview/renderer.php
  2. +4 −1 lib/navigationlib.php
View
3  blocks/course_overview/renderer.php
@@ -104,7 +104,8 @@ public function course_overview($courses, $overviews) {
$html .= html_writer::end_tag('div');
}
- $attributes = array('title' => s($course->fullname));
+ // No need to pass title through s() here as it will be done automatically by html_writer.
+ $attributes = array('title' => $course->fullname);
if ($course->id > 0) {
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
$coursefullname = format_string($course->fullname, true, $course->id);
View
5 lib/navigationlib.php
@@ -2364,6 +2364,7 @@ public function add_course(stdClass $course, $forcegeneric = false, $coursetype
$issite = ($course->id == $SITE->id);
$shortname = format_string($course->shortname, true, array('context' => $coursecontext));
+ $fullname = format_string($course->fullname, true, array('context' => $coursecontext));
if ($issite) {
$parent = $this;
@@ -2402,7 +2403,9 @@ public function add_course(stdClass $course, $forcegeneric = false, $coursetype
$coursenode = $parent->add($shortname, $url, self::TYPE_COURSE, $shortname, $course->id);
$coursenode->nodetype = self::NODETYPE_BRANCH;
$coursenode->hidden = (!$course->visible);
- $coursenode->title(format_string($course->fullname, true, array('context' => context_course::instance($course->id))));
+ // We need to decode &'s here as they will have been added by format_string above and attributes will be encoded again
+ // later.
+ $coursenode->title(str_replace('&', '&', $fullname));
if (!$forcegeneric) {
$this->addedcourses[$course->id] = $coursenode;
}
Please sign in to comment.
Something went wrong with that request. Please try again.