Index: lib.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/forum/lib.php,v retrieving revision 1.609.2.103 diff -u -r1.609.2.103 lib.php --- lib.php 15 Oct 2010 03:13:20 -0000 1.609.2.103 +++ lib.php 6 May 2011 01:05:16 -0000 @@ -1,4 +1,4 @@ -libdir.'/filelib.php'); @@ -372,6 +372,7 @@ } // Verify user is enrollend in course - if not do not send any email + if ($course->category == 0) { // Do not do the check if this is the site course if (!isset($userto->enrolledin[$course->id])) { $userto->enrolledin[$course->id] = has_capability('moodle/course:view', get_context_instance(CONTEXT_COURSE, $course->id)); } @@ -379,7 +380,7 @@ // oops - this user should not receive anything from this course continue; } - + } // Get info about the sending user if (array_key_exists($post->userid, $users)) { // we might know him/her already $userfrom = $users[$post->userid];