small letters for XHTML
[moodle.git] / my / index.php
CommitLineData
0d6b9d4f 1<?php
2
3 // this is the 'my moodle' page
4
5 require_once('../config.php');
6 require_once($CFG->libdir.'/blocklib.php');
7 require_once('pagelib.php');
8
9 require_login();
10
11 $edit = optional_param('edit', '');
12 $blockaction = optional_param('blockaction');
13
14 $PAGE = page_create_instance($USER->id);
15
ee6055eb 16 $pageblocks = blocks_setup($PAGE,BLOCKS_PINNED_BOTH);
0d6b9d4f 17
18 if (!empty($edit) && $PAGE->user_allowed_editing()) {
19 if ($edit == 'on') {
20 $USER->editing = true;
21 } else if ($edit == 'off') {
22 $USER->editing = false;
23 }
24 }
25
26 $PAGE->print_header(get_string('mymoodle','my'));
27
28 echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
29 echo '<tr valign="top">';
30
31
32 $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]), 210);
33
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);
37 echo '</td>';
38 }
39
40 echo '<td valign="top" width="*" id="middle-column">';
41 include('overview.php');
42 echo '</td>';
43
44 $blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
45
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);
49 echo '</td>';
50 }
51
52
53 /// Finish the page
54 echo '</tr></table>';
55
56 print_footer();
57
58
59
60?>