3 require_once(dirname(dirname(__FILE__
)).'/config.php');
4 require_once($CFG->dirroot
.'/my/pagelib.php');
5 require_once($CFG->dirroot
.'/lib/blocklib.php');
10 error("Only the admin can use this page");
13 define('OVERRIDE_PAGE_TYPE',PAGE_MY_MOODLE
);
15 $PAGE = page_create_object(PAGE_MY_MOODLE
,0);
17 $blocks = blocks_setup($PAGE,BLOCKS_PINNED_TRUE
);
19 $strtitle = get_string('pinblocks','my');
21 print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot
.'/'.$CFG->admin
.'/index.php">'.
22 get_string('admin').'</a> -> '.$strtitle);
24 echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
25 echo '<tr valign="top">';
28 $blocks_preferred_width = bounded_number(180, blocks_preferred_width($blocks[BLOCK_POS_LEFT
]), 210);
31 echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
32 blocks_print_group($PAGE, $blocks, BLOCK_POS_LEFT
);
35 echo '<td valign="top" width="*" id="middle-column">';
36 print_simple_box_start('center');
37 print_heading($strtitle);
38 print_string('pinblocksexplan','my');
39 print_simple_box_end();
43 echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
44 blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT
);