From 23e7302a9eb5c5682550d9a89b6901482b87ccf2 Mon Sep 17 00:00:00 2001 From: Charles Fulton Date: Tue, 15 Nov 2011 19:10:58 -0800 Subject: [PATCH] MDL-30273 forum - 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 13a3c121458..2ebec1dfca4 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -4827,6 +4827,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)) {