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;
    }
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;
    }
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 ; }
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
Get aggregation method