-<?php
+<?php // %Id%
// this is the 'my moodle' page
require_once('../config.php');
require_once($CFG->libdir.'/blocklib.php');
+ require_once($CFG->dirroot.'/course/lib.php');
require_once('pagelib.php');
require_login();
}
echo '<td valign="top" width="*" id="middle-column">';
- include('overview.php');
+
+/// The main overview in the middle of the page
+ $courses = get_my_courses($USER->id);
+ $site = get_site();
+
+ if (array_key_exists($site->id,$courses)) {
+ unset($courses[$site->id]);
+ }
+
+ foreach ($courses as $course) {
+ if (isset($USER->timeaccess) && array_key_exists($course->id,$USER->timeaccess)) {
+ $courses[$course->id]->lastaccess = $USER->timeaccess[$course->id];
+ } else {
+ $courses[$course->id]->lastaccess = 0;
+ }
+ }
+
+ if (empty($courses)) {
+ print_simple_box(get_string('nocourses','my'),'center');
+ } else {
+ print_overview($courses);
+ }
+
+
echo '</td>';
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 210);
- if(blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing()) {
+ if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $PAGE->user_is_editing()) {
echo '<td style="vertical-align: top; width: '.$blocks_preferred_width.'px;" id="right-column">';
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
echo '</td>';
print_footer();
-
-
-?>
\ No newline at end of file
+?>
+++ /dev/null
-<?php // $Id$
-
-require_once('../config.php');
-require_once($CFG->dirroot.'/course/lib.php');
-
-require_login();
-
-$courses = get_my_courses($USER->id);
-$site = get_site();
-
-if (array_key_exists($site->id,$courses)) {
- unset($courses[$site->id]);
-}
-
-foreach ($courses as $course) {
- if (isset($USER->timeaccess) && array_key_exists($course->id,$USER->timeaccess)) {
- $courses[$course->id]->lastaccess = $USER->timeaccess[$course->id];
- } else {
- $courses[$course->id]->lastaccess = 0;
- }
-}
-
-if (empty($courses)) {
- print_simple_box(get_string('nocourses','my'),'center');
-}
-else {
- print_overview($courses);
-}
-
-?>
\ No newline at end of file