Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Disallow people posting in forums where they arent allowed to post! 8-.

  • Loading branch information...
commit 6c506ca74420eb971c3fbdbe2cb02da289b41b6a 1 parent 87a2fa0
moodler authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/forum/post.php
View
4 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;
Please sign in to comment.
Something went wrong with that request. Please try again.