MDL-39942: invite only users who can post to discuss
authorKevin Wiliarty <kevin.wiliarty@gmail.com>
Tue, 20 Aug 2013 21:48:10 +0000 (17:48 -0400)
committerKevin Wiliarty <kevin.wiliarty@gmail.com>
Tue, 28 Jan 2014 03:30:47 +0000 (22:30 -0500)
mod/forum/lib.php

index 7696f07..2bad212 100644 (file)
@@ -3561,7 +3561,7 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
     $output .= html_writer::tag('div', implode(' | ', $commandhtml), array('class'=>'commands'));
 
     // Output link to post if required
-    if ($link) {
+    if ($link && forum_user_can_post($forum, $discussion, $USER, $cm, $course, $modcontext)) {
         if ($post->replies == 1) {
             $replystring = get_string('repliesone', 'forum', $post->replies);
         } else {