From fc98c3aecbca5e5c1c255556d707fa07e08a70c3 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Wed, 27 Oct 2010 13:16:52 +0000 Subject: [PATCH] "MDL-24851, added DISTINCT statements" --- mod/forum/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index cc8b210af14..87e50a0f2f4 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -5957,7 +5957,7 @@ function forum_remove_user_tracking($userid, $context) { if (!is_enrolled($context, $userid)) { if ($course = $DB->get_record('course', array('id' => $context->instanceid), 'id')) { // find all forums in which this user has reading tracked - if ($forums = $DB->get_records_sql("SELECT f.id, cm.id as coursemodule + if ($forums = $DB->get_records_sql("SELECT DISTINCT f.id, cm.id as coursemodule FROM {forum} f, {modules} m, {course_modules} cm,