// $Id$ // index.php - the front page. require("config.php"); include("course/lib.php"); include("mod/reading/lib.php"); include("mod/discuss/lib.php"); if (! $site = get_record("course", "category", 0)) { redirect("$CFG->wwwroot/admin/"); } if ($USER) { $headerbutton = update_course_icon($site->id); } else { $headerbutton = "Log in"; } print_header("$site->fullname", "$site->fullname", "", "", "summary))."\">", true, $headerbutton); ?>
$readings = list_all_readings();
if ($site->format > 0 or $readings or $USER->editing) {
print_simple_box("Main Menu", $align="CENTER", $width="100%", $color="$THEME->cellheading");
if ($site->format > 0 ) {
echo " wwwroot/course/mod.php?id=$site->id&week=0&add=reading\">Add Reading... "; } else { echo ""; } } if (isadmin()) { print_simple_box("Admin", $align="CENTER", $width="100%", $color="$THEME->cellheading"); echo " |
if ($site->format == 0 ) {
print_simple_box("Available Courses", $align="CENTER", $width="100%", $color="$THEME->cellheading");
echo " "; print_all_courses(); } else { if (! $newsforum = get_course_news_forum($site->id)) { error("Could not find or create a main forum for the site"); } if ($USER) { $SESSION->fromdiscuss = "$CFG->wwwroot"; if (is_subscribed($USER->id, $newsforum->id)) { $subtext = "Unsubscribe from news"; } else { $subtext = "Subscribe me by mail"; } $headertext = "
"; forum_latest_topics($newsforum->id, $site->format); } ?> |
if ($USER->editing) {
$site->summary .= " |