Skip to content

Commit

Permalink
Merge branch 'MDL-57373-master' of git://github.com/ankitagarwal/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jan 9, 2017
2 parents 3b2c592 + cd65ea6 commit 5445df2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/navigationlib.php
Expand Up @@ -3748,7 +3748,14 @@ public function initialise() {
if ($course->id > 1) {
// It's a real course.
$url = new moodle_url('/course/view.php', array('id' => $course->id));
$flat = new flat_navigation_node(navigation_node::create($course->shortname, $url), 0);

$coursecontext = context_course::instance($course->id, MUST_EXIST);
// This is the name that will be shown for the course.
$coursename = empty($CFG->navshowfullcoursenames) ?
format_string($course->shortname, true, array('context' => $coursecontext)) :
format_string($course->fullname, true, array('context' => $coursecontext));

$flat = new flat_navigation_node(navigation_node::create($coursename, $url), 0);
$flat->key = 'coursehome';

$courseformat = course_get_format($course);
Expand Down

0 comments on commit 5445df2

Please sign in to comment.