original_string: protected function get_all_groups($courseid) {
          global $CFG;
          require_once($CFG->libdir . '/grouplib.php');
  
          if ($courseid != $this->allgroupscourseid) {
              $this->allgroups = groups_get_all_groups($courseid, 0, 0, 'g.id, g.name');
              $this->allgroupscourseid = $courseid;
          }
          return $this->allgroups;
      }
code: protected function get_all_groups($courseid) {
          global $CFG;
          require_once($CFG->libdir . '/grouplib.php');
  
          if ($courseid != $this->allgroupscourseid) {
              $this->allgroups = groups_get_all_groups($courseid, 0, 0, 'g.id, g.name');
              $this->allgroupscourseid = $courseid;
          }
          return $this->allgroups;
      }
code_tokens: protected function get_all_groups ( $ courseid ) { global $ CFG ; require_once ( $ CFG -> libdir . '/grouplib.php' ) ; if ( $ courseid != $ this -> allgroupscourseid ) { $ this -> allgroups = groups_get_all_groups ( $ courseid , 0 , 0 , 'g.id, g.name' ) ; $ this -> allgroupscourseid = $ courseid ; } return $ this -> allgroups ; }
docstring: Gets all groups for the given course.
  
  @param int $courseid Course id
  @return array Array of all the group objects
docstring_tokens: Gets all groups for the given course .