enrolment MDL-23669 Added missing call to $PAGE->set_course from enrol/index.php
authorSam Hemelryk <sam@moodle.com>
Thu, 5 Aug 2010 02:24:39 +0000 (02:24 +0000)
committerSam Hemelryk <sam@moodle.com>
Thu, 5 Aug 2010 02:24:39 +0000 (02:24 +0000)
enrol/index.php

index a957876..02004b4 100644 (file)
@@ -43,6 +43,8 @@ if ($course->id == SITEID) {
     redirect("$CFG->wwwroot/");
 }
 
+$PAGE->set_course($course);
+$PAGE->set_pagelayout('course');
 $PAGE->set_url('/enrol/index.php', array('id'=>$course->id));
 
 // do not allow enrols when in login-as session
@@ -77,8 +79,7 @@ if (is_enrolled($context, $USER, '', true)) {
 
 $PAGE->set_title($course->shortname);
 $PAGE->set_heading($course->fullname);
-$PAGE->navbar->add($course->fullname);
-
+$PAGE->navbar->add(get_string('enrolmentoptions','enrol'));
 
 echo $OUTPUT->header();