From a7b44978a34841f0720fab69adef8b431f0a8ecf Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 24 May 2004 07:24:36 +0000 Subject: [PATCH] Changed the default default blocks so that calendar block is not shown (for CPU issues) and upcoming_events is now shown on the right between news and recent activity The default blocks can be overridden by a setting in config.php $CFG->defaultblocks See: http://moodle.org/mod/forum/discuss.php?d=7784&parent=39296 --- lib/blocklib.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/blocklib.php b/lib/blocklib.php index aa5396d67d..637e7f51b3 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -708,7 +708,17 @@ function block_get_name_by_id ($blockid) { //will be converted to their blockids equivalent. If a course is specified //then the function will update the field too! -function blocks_get_default_blocks ($courseid = NULL, $blocknames="participants,activity_modules,calendar_month,calendar_upcoming,search_forums,admin,course_list:news_items,recent_activity") { +function blocks_get_default_blocks ($courseid = NULL, $blocknames="") { + + global $CFG; + + if (empty($blocknames)) { + if (!empty($CFG->defaultblocks)) { + $blocknames = $CFG->defaultblocks; + } else { + $blocknames = "participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity"; + } + } //Calculate left and right blocks $blocksn = $blocknames; -- 2.39.5