mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
rating MDL-21657 changed rating::load_ratings so the default scale constant has a better name
This commit is contained in:
parent
19383cc5f2
commit
5bdf001089
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user