Removed overview.php

This commit is contained in:
moodler 2006-04-25 13:19:52 +00:00
parent 38943071f0
commit 3131d5c6de
2 changed files with 28 additions and 36 deletions

View 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();
@ -50,12 +51,35 @@
}
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();
?>
?>

View File

@ -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);
}
?>