wwwroot/admin/"); } if (isadmin()) { if (moodle_needs_upgrading()) { redirect("$CFG->wwwroot/admin/"); } $headerbutton = update_course_icon($site->id); } else { if (isset($USER->id)) { $headerbutton = "wwwroot/login/logout.php\">".get_string("logout").""; } else { $headerbutton = "wwwroot/login\">".get_string("login").""; } } print_header("$site->fullname", "$site->fullname", "", "", "summary))."\">", true, $headerbutton); $side = 180; ?> 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_simple_box(get_string("mainmenu"), "CENTER", $side, "$THEME->cellheading"); } if ($sections[0]->sequence) { print_section($site->id, $sections[0], $mods, $modnamesused, true, $side); } if (isediting($site->id)) { echo "
"; popup_form("$CFG->wwwroot/course/mod.php?id=$site->id§ion=0&add=", $modnames, "section0", "", "Add..."); echo "
"; } if ($site->newsitems > 0 ) { print_simple_box(get_string("courses"), "CENTER", $side, "$THEME->cellheading"); print_all_courses($cat=1, "minimal", 10); } 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_simple_box(get_string("availablecourses"), "CENTER", "100%", "$THEME->cellheading"); print_spacer(8,1); print_all_courses(); } 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_simple_box($headertext, "CENTER", "100%", $THEME->cellheading); 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->cellheading); print_spacer(1,$side); echo "