original_string: public function can_view_discussion(stdClass $user, discussion_entity $discussion) : bool {
          $forumrecord = $this->get_forum_record();
          $discussionrecord = $this->get_discussion_record($discussion);
          $context = $this->get_context();
  
          return forum_user_can_see_discussion($forumrecord, $discussionrecord, $context, $user);
      }
code: public function can_view_discussion(stdClass $user, discussion_entity $discussion) : bool {
          $forumrecord = $this->get_forum_record();
          $discussionrecord = $this->get_discussion_record($discussion);
          $context = $this->get_context();
  
          return forum_user_can_see_discussion($forumrecord, $discussionrecord, $context, $user);
      }
code_tokens: public function can_view_discussion ( stdClass $ user , discussion_entity $ discussion ) : bool { $ forumrecord = $ this -> get_forum_record ( ) ; $ discussionrecord = $ this -> get_discussion_record ( $ discussion ) ; $ context = $ this -> get_context ( ) ; return forum_user_can_see_discussion ( $ forumrecord , $ discussionrecord , $ context , $ user ) ; }
docstring: Can the user view the content of a discussion?
  
  @param stdClass $user The user to check
  @param discussion_entity $discussion The discussion to check
  @return bool
docstring_tokens: Can the user view the content of a discussion?