dirroot/mod/forum/lib.php"); if (! $sections = get_all_sections($course->id) ) { $section->course = $course->id; // Create a default section. $section->section = 0; $section->id = insert_record("course_sections", $section); if (! $sections = get_all_sections($course->id) ) { error("Error finding or creating section structures for this course"); } } if (isset($topic)) { if ($topic == "all") { unset($USER->topic); } else { $USER->topic = $topic; } save_session("USER"); } if (isteacher($course->id) and isset($marker)) { $course->marker = $marker; if (! set_field("course", "marker", $marker, "id", $course->id)) { error("Could not mark that topic for this course"); } } if ($course->newsitems) { $news = forum_get_course_forum($course->id, "news"); } $streditsummary = get_string("editsummary"); $stradd = get_string("add"); $stractivities = get_string("activities"); /// Layout the whole page as three big columns. echo "
";
/// Links to people
print_simple_box(get_string("people"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
$moddata[]="id\">".get_string("participants")."";
$modicon[]="![]() ![]() ![]() ";
forum_print_search_form($course);
echo " ";
/// Admin links and controls
if (isteacher($course->id)) {
print_course_admin_links($course);
}
/// Start main column
echo " | ";
print_simple_box(get_string("topicoutline"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
echo "
| ";
/// Print all the news items.
if ($news) {
print_simple_box(get_string("latestnews"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
echo "";
forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "DESC", false);
echo "";
print_simple_box_end();
echo " "; } /// Print all the recent activity if ($course->showrecent) { print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading"); print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0); print_recent_activity($course); print_simple_box_end(); } echo " ![]() |