mirror of
https://github.com/moodle/moodle.git
synced 2025-01-21 07:28:31 +01:00
Little update to select the forum info (avoid duplicates).
This commit is contained in:
parent
dbe0be0059
commit
f99d236832
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user