original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Get aggregation method for badge criteria