protected function sub_test_grade_category_is_aggregationcoef_used() { $category = new grade_category(); // Following use aggregationcoef. $category->aggregation = GRADE_AGGREGATE_WEIGHTED_MEAN; $this->assertTrue($category->is_aggregationcoef_used()); $category->aggregation = GRADE_AGGREGATE_WEIGHTED_MEAN2; $this->assertTrue($category->is_aggregationcoef_used()); $category->aggregation = GRADE_AGGREGATE_EXTRACREDIT_MEAN; $this->assertTrue($category->is_aggregationcoef_used()); $category->aggregation = GRADE_AGGREGATE_SUM; $this->assertTrue($category->is_aggregationcoef_used()); // Following don't use aggregationcoef. $category->aggregation = GRADE_AGGREGATE_MAX; $this->assertFalse($category->is_aggregationcoef_used()); $category->aggregation = GRADE_AGGREGATE_MEAN; $this->assertFalse($category->is_aggregationcoef_used()); $category->aggregation = GRADE_AGGREGATE_MEDIAN; $this->assertFalse($category->is_aggregationcoef_used()); $category->aggregation = GRADE_AGGREGATE_MIN; $this->assertFalse($category->is_aggregationcoef_used()); $category->aggregation = GRADE_AGGREGATE_MODE; $this->assertFalse($category->is_aggregationcoef_used()); }