Little update to select the forum info (avoid duplicates).

This commit is contained in:
stronk7 2003-04-24 17:35:34 +00:00
parent dbe0be0059
commit f99d236832

View File

@ -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) {