mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Merging from STABLE:
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).
This commit is contained in:
parent
5a74ffd344
commit
3525d91b46
@ -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));
|
||||
|
||||
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user