Export now saves file in correct course file area (ie, the current one).
[moodle-linuxchix.git] / my / index.php
blob5f74feb82adb048b007a0d1e131ccb9af90f1987
1 <?php
3 // this is the 'my moodle' page
5 require_once('../config.php');
6 require_once($CFG->libdir.'/blocklib.php');
7 require_once('pagelib.php');
9 require_login();
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()) {
19 if ($edit == 'on') {
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);
37 echo '</td>';
40 echo '<td valign="top" width="*" id="middle-column">';
41 include('overview.php');
42 echo '</td>';
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);
49 echo '</td>';
53 /// Finish the page
54 echo '</tr></table>';
56 print_footer();