public function get_aggregation_method($criteriatype = 0) {
        global $DB;
        $params = array('badgeid' => $this->id, 'criteriatype' => $criteriatype);
        $aggregation = $DB->get_field('badge_criteria', 'method', $params, IGNORE_MULTIPLE);

        if (!$aggregation) {
            return BADGE_CRITERIA_AGGREGATION_ALL;
        }

        return $aggregation;
    }
public function get_aggregation_method($criteriatype = 0) {
        global $DB;
        $params = array('badgeid' => $this->id, 'criteriatype' => $criteriatype);
        $aggregation = $DB->get_field('badge_criteria', 'method', $params, IGNORE_MULTIPLE);

        if (!$aggregation) {
            return BADGE_CRITERIA_AGGREGATION_ALL;
        }

        return $aggregation;
    }
public function get_aggregation_method ( $ criteriatype = 0 ) { global $ DB ; $ params = array ( 'badgeid' => $ this -> id , 'criteriatype' => $ criteriatype ) ; $ aggregation = $ DB -> get_field ( 'badge_criteria' , 'method' , $ params , IGNORE_MULTIPLE ) ; if ( ! $ aggregation ) { return BADGE_CRITERIA_AGGREGATION_ALL ; } return $ aggregation ; }
Get aggregation method for badge criteria

@param int $criteriatype If none supplied, get overall aggregation method (optional)
@return int One of BADGE_CRITERIA_AGGREGATION_ALL or BADGE_CRITERIA_AGGREGATION_ANY
Get aggregation method for badge criteria