From 5cc4e210d9c2139d3276cf66897c68d98a4ce7cf Mon Sep 17 00:00:00 2001 From: Eloy Lafuente Date: Sat, 1 May 2010 17:45:20 +0000 Subject: [PATCH] MDL-22270 ratings - avoid breackage in forum/glossary/data and inform to developer. Thanks Penny. --- rating/lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rating/lib.php b/rating/lib.php index a9ec6c7c1f1..cad11760105 100644 --- a/rating/lib.php +++ b/rating/lib.php @@ -546,6 +546,9 @@ class rating_manager { case RATING_AGGREGATE_SUM: $aggregatestr = 'SUM'; break; + default: + $aggregatestr = 'AVG'; // Default to this to avoid real breakage - MDL-22270 + debugging('Incorrect call to get_aggregation_method(), was called with incorrect aggregate method ' . $aggregate, DEBUG_DEVELOPER); } return $aggregatestr; } @@ -560,4 +563,4 @@ class rating_manager { } return $pluginpermissionsarray; } -}//end rating_manager class definition \ No newline at end of file +}//end rating_manager class definition