From 793253ae05a73574a3ec3b1469d95acf6b24432b Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 17 May 2009 19:19:33 +0000 Subject: [PATCH] MDL-19218 fixed missing method grade_category::is_extracredit_used() - not merged to HEAD --- lib/grade/grade_category.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/grade/grade_category.php b/lib/grade/grade_category.php index e02035f4a5..621cfed598 100644 --- a/lib/grade/grade_category.php +++ b/lib/grade/grade_category.php @@ -835,6 +835,16 @@ class grade_category extends grade_object { } } + /** + * Returns true if category uses extra credit of any kind + * @return boolean true if extra credit used + */ + function is_extracredit_used() { + return ($this->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN2 + or $this->aggregation == GRADE_AGGREGATE_EXTRACREDIT_MEAN + or $this->aggregation == GRADE_AGGREGATE_SUM); + } + /** * Returns true if category uses special aggregation coeficient * @return boolean true if coeficient used -- 2.39.5