]> git.mjollnir.org Git - moodle.git/commitdiff
Removed overview.php
authormoodler <moodler>
Tue, 25 Apr 2006 13:19:52 +0000 (13:19 +0000)
committermoodler <moodler>
Tue, 25 Apr 2006 13:19:52 +0000 (13:19 +0000)
my/index.php
my/overview.php [deleted file]

index 74672501440bf3a43f7a344b751671f18b06da54..00e4fab6c479d4412e91c5d148074c9900e28dd5 100644 (file)
@@ -1,9 +1,10 @@
-<?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>';
@@ -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 (file)
index cb31661..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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