Skip to content

Commit

Permalink
Merging from STABLE:
Browse files Browse the repository at this point in the history
Fix for bug 3364:

The Great Global $course Hack strikes again. I had to put in another instance
of the hack for course themes to work in the "calendar" part of the course.

Hopefully some day we 'll do all that "correctly"! (search for "hack" in
weblib and despair).
  • Loading branch information
defacer committed May 30, 2005
1 parent 5a74ffd commit 3525d91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion calendar/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@
$nav = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$SESSION->cal_course_referer.'">'.$shortname.'</a> -> '.$nav;
}

if (!empty($SESSION->cal_course_referer)) {
// TODO: This is part of the Great $course Hack in Moodle. Replace it at some point.
$course = get_record('course', 'id', $SESSION->cal_course_referer);
} else {
$course = $site;
}

print_header($site->shortname.': '.$strcalendar.': '.$title, $strcalendar, $nav.' -> '.$title,
$focus, '', true, '', user_login_string($site));

Expand Down Expand Up @@ -330,7 +337,9 @@
$form->minutes = '';
}
}
if (!empty($form->courseid)) { // Fixes bug 1488

if (!empty($form->courseid)) {
// TODO: This is part of the Great $course Hack in Moodle. Replace it at some point.
$course = get_record('course', 'id', $form->courseid);
} else {
$course = $site;
Expand Down

0 comments on commit 3525d91

Please sign in to comment.