From a0a4a3c9645d4084de721e1b75419e7e21c7385b Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 13 Mar 2004 10:56:38 +0000 Subject: [PATCH] Some fixes. :-} --- mod/forum/index.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mod/forum/index.php b/mod/forum/index.php index ed3405d184a..e82ace35845 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -61,11 +61,14 @@ if ($learningforums) { // Copy "full" data into this complete array foreach ($learningforums as $learningforum) { - $forum[$learningforum->id] = $learningforum; + $forums[$learningforum->id] = $learningforum; } } foreach ($forums as $forum) { + if (!isset($forum->visible)) { + $forum->visible = true; + } switch ($forum->type) { case "news": case "social": @@ -81,9 +84,12 @@ } break; default: - if (!$course->category) { // On site level all forums are general forums + if (!$course->category or empty($forum->section)) { // Site level or section 0 $generalforums[] = $forum; - } + if (isset($forum->coursemodule)) { + unset($learningforums[$forum->coursemodule]); + } + } break; } }