diff --git a/mod/forum/post.php b/mod/forum/post.php index 2c87a9259cf..b8b584f8c2d 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -114,6 +114,10 @@ if (! $course = get_record("course", "id", $discussion->course)) { error("The course number was incorrect ($discussion->course)"); } + + if (! forum_user_can_post($forum)) { + error("Sorry, but you can not post in this forum."); + } // Load up the $post variable. $post->course = $course->id;