rating MDL-21657 changed rating::load_ratings so the default scale constant has a better name

This commit is contained in:
Andrew Davis 2010-03-19 02:08:31 +00:00
parent 19383cc5f2
commit 5bdf001089

View File

@ -32,7 +32,7 @@ define ('RATING_AGGREGATE_MAXIMUM', 3);
define ('RATING_AGGREGATE_MINIMUM', 4);
define ('RATING_AGGREGATE_SUM', 5);
define ('RATING_SCALE_OUT_OF_5', 5);
define ('RATING_DEFAULT_SCALE', 5);
/**
* The rating class represents a single rating by a single user. It also contains a static method to retrieve sets of ratings.
@ -207,7 +207,7 @@ class rating implements renderable {
* @param string $returnurl the url to return the user to after submitting a rating. Can be left null for ajax requests.
* @return array the array of items with their ratings attached at $items[0]->rating
*/
public static function load_ratings($context, $items, $aggregate=RATING_AGGREGATE_AVERAGE, $scaleid=RATING_SCALE_OUT_OF_5, $userid = null, $returnurl = null) {
public static function load_ratings($context, $items, $aggregate=RATING_AGGREGATE_AVERAGE, $scaleid=RATING_DEFAULT_SCALE, $userid = null, $returnurl = null) {
global $DB, $USER, $PAGE, $CFG;
if(empty($items)) {