enrol MDL-19795 Upgraded print_header and build_navigation calls to OUTPUT/PAGE equivilants

This commit is contained in:
samhemelryk 2009-09-04 06:29:26 +00:00
parent 15ca5e5e0d
commit 01d082fa17
7 changed files with 52 additions and 49 deletions

View file

@ -9,7 +9,7 @@ class enrolment_plugin_paypal {
/// Override the base print_entry() function
function print_entry($course) {
global $CFG, $USER, $OUTPUT;
global $CFG, $USER, $OUTPUT, $PAGE;
$strloginto = get_string("loginto", "", $course->shortname);
@ -29,12 +29,11 @@ function print_entry($course) {
$manual->print_entry($course);
} else {
$navlinks = array();
$navlinks[] = array('name' => $strcourses, 'link' => "$CFG->wwwroot/course", 'type' => 'misc');
$navlinks[] = array('name' => $strloginto, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($strloginto, $course->fullname, $navigation);
$PAGE->navbar->add($strcourses, new moodle_url($CFG->wwwroot.'/course/'));
$PAGE->navbar->add($strloginto);
$PAGE->set_title($strloginto);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
print_course($course, "80%");
if ($course->password) { // Presenting two options

View file

@ -29,7 +29,7 @@
redirect($destination, get_string('paymentthanks', '', $course->fullname));
} else { /// Somehow they aren't enrolled yet! :-(
print_header();
echo $OUTPUT->header();
notice(get_string('paymentsorry', '', get_string('defaultcourseteacher')), $destination);
}