From 38fcc21592da66cf1f6647286621b7f149502d9a Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 17 Sep 2004 03:00:20 +0000 Subject: [PATCH] Merged PHP5 fix from stable --- mod/forum/index.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/mod/forum/index.php b/mod/forum/index.php index 4fdbb6c259..1b220837f4 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -40,7 +40,7 @@ $searchform = forum_print_search_form($course, "", true, "plain"); - // Build up the tables + // Start of the table for General Forums $generaltable->head = array ($strforum, $strdescription, $strdiscussions); $generaltable->align = array ("left", "left", "center"); @@ -56,7 +56,6 @@ $generaltable->align[] = "center"; } - $learningtable = $generaltable; // Headers etc are the same // Parse and organise all the forums. Most forums are course modules but // some special ones are not. These get placed in the general forums @@ -178,6 +177,22 @@ } } + + // Start of the table for Learning Forums + $learningtable->head = array ($strforum, $strdescription, $strdiscussions); + $learningtable->align = array ("left", "left", "center"); + + if ($can_subscribe = (isstudent($course->id) or isteacher($course->id) or isadmin())) { + $learningtable->head[] = $strsubscribed; + $learningtable->align[] = "center"; + } + + if ($show_rss = ($can_subscribe && isset($CFG->enablerssfeeds) && isset($CFG->forum_enablerssfeeds) && + $CFG->enablerssfeeds && $CFG->forum_enablerssfeeds)) { + $learningtable->head[] = $strrss; + $learningtable->align[] = "center"; + } + /// Now let's process the learning forums if ($course->category) { // Only real courses have learning forums @@ -268,7 +283,7 @@ if ($course->category) { print_header("$course->shortname: $strforums", "$course->fullname", - "id>$course->shortname -> $strforums", + "id\">$course->shortname -> $strforums", "", "", true, $searchform, navmenu($course)); } else { print_header("$course->shortname: $strforums", "$course->fullname", "$strforums", -- 2.39.5