original_string: public function get_criteria() {
          global $DB;
          $criteria = array();
  
          if ($records = (array)$DB->get_records('badge_criteria', array('badgeid' => $this->id))) {
              foreach ($records as $record) {
                  $criteria[$record->criteriatype] = award_criteria::build((array)$record);
              }
          }
  
          return $criteria;
      }
code: public function get_criteria() {
          global $DB;
          $criteria = array();
  
          if ($records = (array)$DB->get_records('badge_criteria', array('badgeid' => $this->id))) {
              foreach ($records as $record) {
                  $criteria[$record->criteriatype] = award_criteria::build((array)$record);
              }
          }
  
          return $criteria;
      }
code_tokens: public function get_criteria ( ) { global $ DB ; $ criteria = array ( ) ; if ( $ records = ( array ) $ DB -> get_records ( 'badge_criteria' , array ( 'badgeid' => $ this -> id ) ) ) { foreach ( $ records as $ record ) { $ criteria [ $ record -> criteriatype ] = award_criteria :: build ( ( array ) $ record ) ; } } return $ criteria ; }
docstring: Returns badge award criteria
  
  @return array An array of badge criteria
docstring_tokens: Returns badge award criteria