From 0f035ff23bd6705c469120be61e16819a13492c2 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 9e65d1e7d2f..f2cad00750d 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -4483,6 +4483,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)) {