From: skodak Date: Sun, 17 May 2009 19:19:33 +0000 (+0000) Subject: MDL-19218 fixed missing method grade_category::is_extracredit_used() - not merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=793253ae05a73574a3ec3b1469d95acf6b24432b;p=moodle.git MDL-19218 fixed missing method grade_category::is_extracredit_used() - not merged to HEAD --- 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