diff --git a/my/index.php b/my/index.php
index 74672501440..00e4fab6c47 100644
--- a/my/index.php
+++ b/my/index.php
@@ -1,9 +1,10 @@
-libdir.'/blocklib.php');
+ require_once($CFG->dirroot.'/course/lib.php');
require_once('pagelib.php');
require_login();
@@ -50,12 +51,35 @@
}
echo '
';
- 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 ' | ';
$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 '';
blocks_print_group($PAGE, $pageblocks, BLOCK_POS_RIGHT);
echo ' | ';
@@ -67,6 +91,4 @@
print_footer();
-
-
-?>
\ No newline at end of file
+?>
diff --git a/my/overview.php b/my/overview.php
deleted file mode 100644
index cb31661695a..00000000000
--- a/my/overview.php
+++ /dev/null
@@ -1,30 +0,0 @@
-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