From 07b11e4fcb04597096db2429912762aa1d754ae7 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 8 Mar 2005 23:35:35 +0000 Subject: [PATCH] course/lib must be included ALWAYS because block_site_main_menu uses it. --- index.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.php b/index.php index 6c9014cd212..1eb3cc077fd 100644 --- a/index.php +++ b/index.php @@ -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);