course/lib must be included ALWAYS because block_site_main_menu uses it.

This commit is contained in:
stronk7 2005-03-08 23:35:35 +00:00
parent 71d4f59316
commit 07b11e4fcb

View File

@ -13,6 +13,7 @@
define('BLOCK_R_MAX_WIDTH', 210);
require_once('config.php');
require_once($CFG->dirroot .'/course/lib.php');
require_once($CFG->dirroot .'/lib/blocklib.php');
if (empty($SITE)) {
@ -72,8 +73,6 @@
/// Print Section
if ($SITE->numsections > 0) {
require_once($CFG->dirroot .'/course/lib.php');
if (!$section = get_record('course_sections', 'course', $SITE->id, 'section', 1)) {
delete_records('course_sections', 'course', $SITE->id, 'section', 1); // Just in case
$section->course = $SITE->id;
@ -148,8 +147,6 @@
case FRONTPAGECOURSELIST:
case FRONTPAGECATEGORYNAMES:
require_once($CFG->dirroot .'/course/lib.php');
if (isset($USER->id) and !isset($USER->admin)) {
print_heading_block(get_string('mycourses'));
print_spacer(8,1);