From 5a1038bb47de698e73f03d248d0ab36e99f78404 Mon Sep 17 00:00:00 2001 From: Charles Fulton Date: Tue, 15 Nov 2011 19:10:58 -0800 Subject: [PATCH] MDL-30273 prevent the creation of discussions in simple single forums --- mod/forum/lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 4a0e2f7dacf..14f84203193 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -4831,6 +4831,10 @@ function forum_user_can_post_discussion($forum, $currentgroup=null, $unused=-1, if (!has_capability($capname, $context)) { return false; } + + if ($forum->type == 'single') { + return false; + } if ($forum->type == 'eachuser') { if (forum_user_has_posted_discussion($forum->id, $USER->id)) {