original_string: protected function can_post($course, $forum, $discussion, $post, $cm, $context) {
          if (!isset($this->canpostto[$discussion->id])) {
              $this->canpostto[$discussion->id] = forum_user_can_post($forum, $discussion, $this->recipient, $cm, $course, $context);
          }
          return $this->canpostto[$discussion->id];
      }
code: protected function can_post($course, $forum, $discussion, $post, $cm, $context) {
          if (!isset($this->canpostto[$discussion->id])) {
              $this->canpostto[$discussion->id] = forum_user_can_post($forum, $discussion, $this->recipient, $cm, $course, $context);
          }
          return $this->canpostto[$discussion->id];
      }
code_tokens: protected function can_post ( $ course , $ forum , $ discussion , $ post , $ cm , $ context ) { if ( ! isset ( $ this -> canpostto [ $ discussion -> id ] ) ) { $ this -> canpostto [ $ discussion -> id ] = forum_user_can_post ( $ forum , $ discussion , $ this -> recipient , $ cm , $ course , $ context ) ; } return $ this -> canpostto [ $ discussion -> id ] ; }
docstring: Check whether the user can post.
  
  @param   \stdClass   $course
  @param   \stdClass   $forum
  @param   \stdClass   $discussion
  @param   \stdClass   $post
  @param   \stdClass   $cm
  @param   \context    $context
  @return  bool
docstring_tokens: Check whether the user can post .