]> git.mjollnir.org Git - moodle.git/commitdiff
Remove "news" and "social" forums from learning forums.
authormoodler <moodler>
Fri, 25 Oct 2002 14:46:42 +0000 (14:46 +0000)
committermoodler <moodler>
Fri, 25 Oct 2002 14:46:42 +0000 (14:46 +0000)
mod/forum/index.php

index b5a4df34123e0628fe0d43f7e4e00de9e7bfde0a..b1ed1889be73ef1465141b1627e9b3bd69c30839 100644 (file)
         array_unshift($table->align, "CENTER");
     
         if ($learningforums = get_all_instances_in_course("forum", $course->id)) {
+            foreach ($learningforums as $key => $forum) {
+                if ($forum->type == "news" or $forum->type == "social") {
+                    unset($learningforums[$key]);  // Remove these
+                }
+            }
+        }
+        if ($learningforums) {
             foreach ($learningforums as $forum) {
                 $count = count_records("forum_discussions", "forum", "$forum->id");