error("Serious Error! Could not update the site record! (id = $form->id)");
}
} else {
+ // [pj] We are about to create the site, so let's add some blocks...
+ // calendar_month is included as a Moodle feature advertisement ;-)
+ require_once('../lib/blocklib.php');
+ $form->blockinfo = blocks_get_default_blocks(NULL, 'site_main_menu,admin,course_list:course_summary,calendar_month');
+
if ($newid = insert_record("course", $form)) {
$cat->name = get_string("miscellaneous");
if (insert_record("course_categories", $cat)) {
<?PHP // $Id$
// index.php - the front page.
+ // Bounds for block widths
+ define('BLOCK_L_MIN_WIDTH', 160);
+ define('BLOCK_L_MAX_WIDTH', 210);
+ define('BLOCK_R_MIN_WIDTH', 160);
+ define('BLOCK_R_MAX_WIDTH', 210);
+
require_once("config.php");
require_once("course/lib.php");
require_once('lib/blocklib.php');
$preferred_width_right = $SESSION->blockcache->width->{$site->id}->right;
}
+ $preferred_width_left = min($preferred_width_left, BLOCK_L_MAX_WIDTH);
+ $preferred_width_left = max($preferred_width_left, BLOCK_L_MIN_WIDTH);
+ $preferred_width_right = min($preferred_width_right, BLOCK_R_MAX_WIDTH);
+ $preferred_width_right = max($preferred_width_right, BLOCK_R_MIN_WIDTH);
+
?>