original_string: public function can_post_in_discussion(stdClass $user, discussion_entity $discussion) : bool {
          $forum = $this->get_forum();
          $forumrecord = $this->get_forum_record();
          $discussionrecord = $this->get_discussion_record($discussion);
          $context = $this->get_context();
          $coursemodule = $forum->get_course_module_record();
          $course = $forum->get_course_record();
  
          return forum_user_can_post($forumrecord, $discussionrecord, $user, $coursemodule, $course, $context);
      }
code: public function can_post_in_discussion(stdClass $user, discussion_entity $discussion) : bool {
          $forum = $this->get_forum();
          $forumrecord = $this->get_forum_record();
          $discussionrecord = $this->get_discussion_record($discussion);
          $context = $this->get_context();
          $coursemodule = $forum->get_course_module_record();
          $course = $forum->get_course_record();
  
          return forum_user_can_post($forumrecord, $discussionrecord, $user, $coursemodule, $course, $context);
      }
code_tokens: public function can_post_in_discussion ( stdClass $ user , discussion_entity $ discussion ) : bool { $ forum = $ this -> get_forum ( ) ; $ forumrecord = $ this -> get_forum_record ( ) ; $ discussionrecord = $ this -> get_discussion_record ( $ discussion ) ; $ context = $ this -> get_context ( ) ; $ coursemodule = $ forum -> get_course_module_record ( ) ; $ course = $ forum -> get_course_record ( ) ; return forum_user_can_post ( $ forumrecord , $ discussionrecord , $ user , $ coursemodule , $ course , $ context ) ; }
docstring: Can the user post in this discussion?
  
  @param stdClass $user The user to check
  @param discussion_entity $discussion The discussion to check
  @return bool
docstring_tokens: Can the user post in this discussion?