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;
    }
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;
    }
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 ; }
Returns badge award criteria

@return array An array of badge criteria
Returns badge award criteria