original_string: public function get_aggregation_method($criteriatype = null) {
          $params = array(
              'course'        => $this->course_id,
              'criteriatype'  => $criteriatype
          );
  
          $aggregation = new completion_aggregation($params);
  
          if (!$aggregation->id) {
              $aggregation->method = COMPLETION_AGGREGATION_ALL;
          }
  
          return $aggregation->method;
      }
code: public function get_aggregation_method($criteriatype = null) {
          $params = array(
              'course'        => $this->course_id,
              'criteriatype'  => $criteriatype
          );
  
          $aggregation = new completion_aggregation($params);
  
          if (!$aggregation->id) {
              $aggregation->method = COMPLETION_AGGREGATION_ALL;
          }
  
          return $aggregation->method;
      }
code_tokens: public function get_aggregation_method ( $ criteriatype = null ) { $ params = array ( 'course' => $ this -> course_id , 'criteriatype' => $ criteriatype ) ; $ aggregation = new completion_aggregation ( $ params ) ; if ( ! $ aggregation -> id ) { $ aggregation -> method = COMPLETION_AGGREGATION_ALL ; } return $ aggregation -> method ; }
docstring: Get aggregation method
  
  @param int $criteriatype If none supplied, get overall aggregation method (optional)
  @return int One of COMPLETION_AGGREGATION_ALL or COMPLETION_AGGREGATION_ANY
docstring_tokens: Get aggregation method