Skip to content

Commit

Permalink
course/lib must be included ALWAYS because block_site_main_menu uses it.
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Mar 8, 2005
1 parent 71d4f59 commit 07b11e4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 07b11e4

Please sign in to comment.