From f99d2368323b51375c307e2ddf3b21cc333cf2a2 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 24 Apr 2003 17:35:34 +0000 Subject: [PATCH] Little update to select the forum info (avoid duplicates). --- mod/forum/index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mod/forum/index.php b/mod/forum/index.php index 090163d0f8..eb150e0551 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -54,11 +54,14 @@ //Obtains all the forum data and visible field if ($forums = get_records_sql("SELECT f.*,cm.visible as visible FROM {$CFG->prefix}course_modules cm, - {$CFG->prefix}forum f + {$CFG->prefix}forum f, + {$CFG->prefix}modules md WHERE cm.course = '$id' AND f.course = '$id' AND + md.name = 'forum' AND + md.id = cm.module AND f.id = cm.instance - ORDER BY name ASC")) + ORDER BY f.name")) { foreach ($forums as $forum) { switch ($forum->type) { -- 2.39.5