Skip to content

Commit

Permalink
rating MDL-21657 changed rating::load_ratings so the default scale co…
Browse files Browse the repository at this point in the history
…nstant has a better name
  • Loading branch information
Andrew Davis committed Mar 19, 2010
1 parent 19383cc commit 5bdf001
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rating/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
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.
Expand Down Expand Up @@ -207,7 +207,7 @@ public static function load_ratings_for_item($context, $itemid, $sort) {
* @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)) {
Expand Down

0 comments on commit 5bdf001

Please sign in to comment.