wwwroot/admin/index.php"); } if (isadmin()) { if (moodle_needs_upgrading()) { redirect("$CFG->wwwroot/admin/index.php"); } $headerbutton = update_course_icon($site->id); } else { if (isset($USER->id)) { $headerbutton = "wwwroot/login/logout.php\">".get_string("logout").""; } else { $headerbutton = "wwwroot/login/index.php\">".get_string("login").""; } } print_header("$site->fullname", "$site->fullname", "home", "", "summary))."\">", true, "", $headerbutton); $firstcolumn = false; // for now $side = 175; ?> id); if ($site->newsitems > 0 or $sections[0]->sequence or isediting($site->id)) { echo ""; } echo ""; echo ""; ?>
"; $firstcolumn=true; if ($sections[0]->sequence or isediting($site->id)) { get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused); print_section_block(get_string("mainmenu"), $site, $sections[0], $mods, $modnames, $modnamesused, true, $side, isediting($site->id)); } if ($site->newsitems > 0 ) { $categories = get_categories(); if (count($categories) > 1) { print_course_categories($categories, "none", $side); } else { $category = array_shift($categories); print_all_courses($category->id, "minimal", 10, $side); } } print_spacer(1,$side); } if (isadmin()) { if (!$firstcolumn) { echo ""; $firstcolumn=true; } print_admin_links($site->id, $side); } if ($firstcolumn) { echo ""; if ($site->newsitems == 0 ) { print_heading_block(get_string("availablecourses")); print_spacer(8,1); $categories = get_categories(); if (count($categories) > 1) { print_course_categories($categories, "index"); } else { print_all_courses("all"); } } else { if (! $newsforum = forum_get_course_forum($site->id, "news")) { error("Could not find or create a main news forum for the site"); } if (isset($USER->id)) { $SESSION->fromdiscussion = "$CFG->wwwroot"; save_session("SESSION"); if (forum_is_subscribed($USER->id, $newsforum->id)) { $subtext = get_string("unsubscribe", "forum"); } else { $subtext = get_string("subscribe", "forum"); } $headertext = "
".get_string("sitenews")." id\">$subtext
"; } else { $headertext = get_string("sitenews"); } print_heading_block($headertext); print_spacer(8,1); forum_print_latest_discussions($newsforum->id, $site->newsitems); } echo "
"; if (isediting($site->id)) { $site->summary .= "
"; } print_simple_box($site->summary, "", "100%", $THEME->cellcontent2, 5, "siteinfo"); print_spacer(1,$side); echo "