mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
course/lib must be included ALWAYS because block_site_main_menu uses it.
This commit is contained in:
parent
71d4f59316
commit
07b11e4fcb
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user