Incorrect variable name - not sure why this worked!
[moodle-linuxchix.git] / admin / mymoodle.php
blob3c8e1d3cac6f1e8d52a0727cfaab1d3e685bf5d8
1 <?
3 require_once(dirname(dirname(__FILE__)).'/config.php');
4 require_once($CFG->dirroot.'/my/pagelib.php');
5 require_once($CFG->dirroot.'/lib/blocklib.php');
7 require_login();
9 if (!isadmin()) {
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);
33 echo '</td>';
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();
40 echo '</td>';
43 echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
44 blocks_print_group($PAGE, $blocks, BLOCK_POS_RIGHT);
45 echo '</td>';
47 echo '</tr></table>';
49 print_footer();