original_string: public function get_submission_group($userid) {
  
          if (isset($this->usersubmissiongroups[$userid])) {
              return $this->usersubmissiongroups[$userid];
          }
  
          $groups = $this->get_all_groups($userid);
          if (count($groups) != 1) {
              $return = false;
          } else {
              $return = array_pop($groups);
          }
  
          // Cache the user submission group.
          $this->usersubmissiongroups[$userid] = $return;
  
          return $return;
      }
code: public function get_submission_group($userid) {
  
          if (isset($this->usersubmissiongroups[$userid])) {
              return $this->usersubmissiongroups[$userid];
          }
  
          $groups = $this->get_all_groups($userid);
          if (count($groups) != 1) {
              $return = false;
          } else {
              $return = array_pop($groups);
          }
  
          // Cache the user submission group.
          $this->usersubmissiongroups[$userid] = $return;
  
          return $return;
      }
code_tokens: public function get_submission_group ( $ userid ) { if ( isset ( $ this -> usersubmissiongroups [ $ userid ] ) ) { return $ this -> usersubmissiongroups [ $ userid ] ; } $ groups = $ this -> get_all_groups ( $ userid ) ; if ( count ( $ groups ) != 1 ) { $ return = false ; } else { $ return = array_pop ( $ groups ) ; } // Cache the user submission group. $ this -> usersubmissiongroups [ $ userid ] = $ return ; return $ return ; }
docstring: This is used for team assignments to get the group for the specified user.
  If the user is a member of multiple or no groups this will return false
  
  @param int $userid The id of the user whose submission we want
  @return mixed The group or false
docstring_tokens: This is used for team assignments to get the group for the specified user . If the user is a member of multiple or no groups this will return false