original_string: public function get_submission_group_members($groupid, $onlyids, $excludesuspended = false) {
          $members = array();
          if ($groupid != 0) {
              $allusers = $this->list_participants($groupid, $onlyids);
              foreach ($allusers as $user) {
                  if ($this->get_submission_group($user->id)) {
                      $members[] = $user;
                  }
              }
          } else {
              $allusers = $this->list_participants(null, $onlyids);
              foreach ($allusers as $user) {
                  if ($this->get_submission_group($user->id) == null) {
                      $members[] = $user;
                  }
              }
          }
          // Exclude suspended users, if user can't see them.
          if ($excludesuspended || !has_capability('moodle/course:viewsuspendedusers', $this->context)) {
              foreach ($members as $key => $member) {
                  if (!$this->is_active_user($member->id)) {
                      unset($members[$key]);
                  }
              }
          }
  
          return $members;
      }
code: public function get_submission_group_members($groupid, $onlyids, $excludesuspended = false) {
          $members = array();
          if ($groupid != 0) {
              $allusers = $this->list_participants($groupid, $onlyids);
              foreach ($allusers as $user) {
                  if ($this->get_submission_group($user->id)) {
                      $members[] = $user;
                  }
              }
          } else {
              $allusers = $this->list_participants(null, $onlyids);
              foreach ($allusers as $user) {
                  if ($this->get_submission_group($user->id) == null) {
                      $members[] = $user;
                  }
              }
          }
          // Exclude suspended users, if user can't see them.
          if ($excludesuspended || !has_capability('moodle/course:viewsuspendedusers', $this->context)) {
              foreach ($members as $key => $member) {
                  if (!$this->is_active_user($member->id)) {
                      unset($members[$key]);
                  }
              }
          }
  
          return $members;
      }
code_tokens: public function get_submission_group_members ( $ groupid , $ onlyids , $ excludesuspended = false ) { $ members = array ( ) ; if ( $ groupid != 0 ) { $ allusers = $ this -> list_participants ( $ groupid , $ onlyids ) ; foreach ( $ allusers as $ user ) { if ( $ this -> get_submission_group ( $ user -> id ) ) { $ members [ ] = $ user ; } } } else { $ allusers = $ this -> list_participants ( null , $ onlyids ) ; foreach ( $ allusers as $ user ) { if ( $ this -> get_submission_group ( $ user -> id ) == null ) { $ members [ ] = $ user ; } } } // Exclude suspended users, if user can't see them. if ( $ excludesuspended || ! has_capability ( 'moodle/course:viewsuspendedusers' , $ this -> context ) ) { foreach ( $ members as $ key => $ member ) { if ( ! $ this -> is_active_user ( $ member -> id ) ) { unset ( $ members [ $ key ] ) ; } } } return $ members ; }
docstring: Get a list of the users in the same group as this user.
  
  @param int $groupid The id of the group whose members we want or 0 for the default group
  @param bool $onlyids Whether to retrieve only the user id's
  @param bool $excludesuspended Whether to exclude suspended users
  @return array The users (possibly id's only)
docstring_tokens: Get a list of the users in the same group as this user .