3 // this is the 'my moodle' page
5 require_once('../config.php');
6 require_once($CFG->libdir
.'/blocklib.php');
7 require_once('pagelib.php');
11 $edit = optional_param('edit', '');
12 $blockaction = optional_param('blockaction');
14 $PAGE = page_create_instance($USER->id
);
16 $pageblocks = blocks_setup($PAGE,BLOCKS_PINNED_BOTH
);
18 if (!empty($edit) && $PAGE->user_allowed_editing()) {
20 $USER->editing
= true;
21 } else if ($edit == 'off') {
22 $USER->editing
= false;
26 $PAGE->print_header(get_string('mymoodle','my'));
28 echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
29 echo '<tr valign="top">';
32 $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT
]), 210);
34 if(blocks_have_content($pageblocks, BLOCK_POS_LEFT
) ||
$PAGE->user_is_editing()) {
35 echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="left-column">';
36 blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT
);
40 echo '<td valign="top" width="*" id="middle-column">';
41 include('overview.php');
44 $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT
]), 210);
46 if(blocks_have_content($pageblocks, BLOCK_POS_RIGHT
) ||
$PAGE->user_is_editing()) {
47 echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="right-column">';
48 blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT
);