original_string: public function add_user_to_group($user, $groupid) {
          require_capability('moodle/course:managegroups', $this->context);
          $group = $this->get_group($groupid);
          if (!$group) {
              return false;
          }
          return groups_add_member($group->id, $user->id);
      }
code: public function add_user_to_group($user, $groupid) {
          require_capability('moodle/course:managegroups', $this->context);
          $group = $this->get_group($groupid);
          if (!$group) {
              return false;
          }
          return groups_add_member($group->id, $user->id);
      }
code_tokens: public function add_user_to_group ( $ user , $ groupid ) { require_capability ( 'moodle/course:managegroups' , $ this -> context ) ; $ group = $ this -> get_group ( $ groupid ) ; if ( ! $ group ) { return false ; } return groups_add_member ( $ group -> id , $ user -> id ) ; }
docstring: Adds a user to a group
  
  @param stdClass $user
  @param int $groupid
  @return bool
docstring_tokens: Adds a user to a group