original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Gets all the groupings on the course.
  
  @param int $courseid Course id
  @return array Array of grouping objects
docstring_tokens: Gets all the groupings on the course .