Skip to content

Commit

Permalink
Revert "MDL-38055 block_courseoverview: fixed formatting of course fu…
Browse files Browse the repository at this point in the history
…llname"

This reverts commit a9ff599.
This reverts commit 4e83302.

This issue has failed testing and will be delayed
  • Loading branch information
Damyon Wiese committed Mar 7, 2013
1 parent b9f3138 commit 3d231ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions blocks/course_overview/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,25 @@ public function course_overview($courses, $overviews) {
if ($ismovingcourse && ($course->id == $movingcourseid)) {
continue;
}

$context = context_course::instance($course->id);
$fullname = format_string($course->fullname, true, array('context' => $context));

$html .= $this->output->box_start('coursebox', "course-{$course->id}");
$html .= html_writer::start_tag('div', array('class' => 'course_title'));
// If user is editing, then add move icons.
if ($userediting && !$ismovingcourse) {
$moveicon = html_writer::empty_tag('img',
array('src' => $this->pix_url('t/move')->out(false),
'alt' => get_string('movecourse', 'block_course_overview', $fullname),
'alt' => get_string('movecourse', 'block_course_overview', $course->fullname),
'title' => get_string('move')));
$moveurl = new moodle_url($this->page->url, array('sesskey' => sesskey(), 'movecourse' => 1, 'courseid' => $course->id));
$moveurl = html_writer::link($moveurl, $moveicon);
$html .= html_writer::tag('div', $moveurl, array('class' => 'move'));

}

$attributes = array('title' => str_replace('&', '&', $fullname));
$attributes = array('title' => s($course->fullname));
if ($course->id > 0) {
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
$link = html_writer::link($courseurl, $fullname, $attributes);
$coursefullname = format_string($course->fullname, true, $course->id);
$link = html_writer::link($courseurl, $coursefullname, $attributes);
$html .= $this->output->heading($link, 2, 'title');
} else {
$html .= $this->output->heading(html_writer::link(
Expand Down Expand Up @@ -138,7 +135,7 @@ public function course_overview($courses, $overviews) {
array('sesskey' => sesskey(), 'moveto' => $courseordernumber, 'courseid' => $movingcourseid));
$a = new stdClass();
$a->movingcoursename = $courses[$movingcourseid]->fullname;
$a->currentcoursename = $fullname;
$a->currentcoursename = $course->fullname;
$movehereicon = html_writer::empty_tag('img',
array('src' => $this->output->pix_url('movehere'),
'alt' => get_string('moveafterhere', 'block_course_overview', $a),
Expand Down
2 changes: 1 addition & 1 deletion lib/navigationlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@ public function add_course(stdClass $course, $forcegeneric = false, $coursetype
$coursenode = $parent->add($coursename, $url, self::TYPE_COURSE, $shortname, $course->id);
$coursenode->nodetype = self::NODETYPE_BRANCH;
$coursenode->hidden = (!$course->visible);
$coursenode->title(str_replace('&', '&', $fullname));
$coursenode->title($fullname);
if (!$forcegeneric) {
$this->addedcourses[$course->id] = $coursenode;
}
Expand Down

0 comments on commit 3d231ed

Please sign in to comment.