]> git.mjollnir.org Git - moodle.git/commitdiff
Changed the default default blocks so that calendar block is not shown
authormoodler <moodler>
Mon, 24 May 2004 07:24:36 +0000 (07:24 +0000)
committermoodler <moodler>
Mon, 24 May 2004 07:24:36 +0000 (07:24 +0000)
(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

index aa5396d67d137869587893a716b65923fe3db798..637e7f51b3ab3d9132386034d966169abaa71b52 100644 (file)
@@ -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;