]> git.mjollnir.org Git - moodle.git/commitdiff
Merged PHP5 fix from stable
authormoodler <moodler>
Fri, 17 Sep 2004 03:00:20 +0000 (03:00 +0000)
committermoodler <moodler>
Fri, 17 Sep 2004 03:00:20 +0000 (03:00 +0000)
mod/forum/index.php

index 4fdbb6c259757b9c365e98d0402127a7baf343e4..1b220837f402f913a81e12fdc9020e847a6a8988 100644 (file)
@@ -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 
         }
     } 
 
+
+    // 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
 
     if ($course->category) {
         print_header("$course->shortname: $strforums", "$course->fullname",
-                    "<a href=../../course/view.php?id=$course->id>$course->shortname</a> -> $strforums",
+                    "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $strforums",
                     "", "", true, $searchform, navmenu($course));
     } else {
         print_header("$course->shortname: $strforums", "$course->fullname", "$strforums",