protected function get_all_groupings($courseid) {
        global $DB;
        if ($courseid != $this->allgroupingscourseid) {
            $this->allgroupings = $DB->get_records('groupings',
                    array('courseid' => $courseid), 'id, name');
            $this->allgroupingscourseid = $courseid;
        }
        return $this->allgroupings;
    }
protected function get_all_groupings($courseid) {
        global $DB;
        if ($courseid != $this->allgroupingscourseid) {
            $this->allgroupings = $DB->get_records('groupings',
                    array('courseid' => $courseid), 'id, name');
            $this->allgroupingscourseid = $courseid;
        }
        return $this->allgroupings;
    }
protected function get_all_groupings ( $ courseid ) { global $ DB ; if ( $ courseid != $ this -> allgroupingscourseid ) { $ this -> allgroupings = $ DB -> get_records ( 'groupings' , array ( 'courseid' => $ courseid ) , 'id, name' ) ; $ this -> allgroupingscourseid = $ courseid ; } return $ this -> allgroupings ; }
Gets all the groupings on the course.

@param int $courseid Course id
@return array Array of grouping objects
Gets all the groupings on the course .