Rating external functions.
More...
|
static | add_rating ($contextlevel, $instanceid, $component, $ratingarea, $itemid, $scaleid, $rating, $rateduserid, $aggregation=RATING_AGGREGATE_NONE) |
| Adds a rating to an item.
|
|
static | add_rating_parameters () |
| Returns description of add_rating parameters.
|
|
static | add_rating_returns () |
| Returns description of add_rating result values.
|
|
static | get_item_ratings ($contextlevel, $instanceid, $component, $ratingarea, $itemid, $scaleid, $sort) |
| Retrieve a list of ratings for a given item (forum post etc)
|
|
static | get_item_ratings_parameters () |
| Returns description of get_item_ratings parameters.
|
|
static | get_item_ratings_returns () |
| Returns description of get_item_ratings result values.
|
|
◆ add_rating()
static core_rating_external::add_rating |
( |
| $contextlevel, |
|
|
| $instanceid, |
|
|
| $component, |
|
|
| $ratingarea, |
|
|
| $itemid, |
|
|
| $scaleid, |
|
|
| $rating, |
|
|
| $rateduserid, |
|
|
| $aggregation = RATING_AGGREGATE_NONE ) |
|
static |
Adds a rating to an item.
- Parameters
-
string | $contextlevel | course, module, user... |
int | $instanceid | the instance if for the context element |
string | $component | the name of the component |
string | $ratingarea | rating area |
int | $itemid | the item id |
int | $scaleid | the scale id |
int | $rating | the user rating |
int | $rateduserid | the rated user id |
int | $aggregation | the aggregation method |
- Return values
-
array | result and possible warnings |
- Exceptions
-
- Since
- Moodle 3.2
◆ add_rating_parameters()
static core_rating_external::add_rating_parameters |
( |
| ) |
|
|
static |
Returns description of add_rating parameters.
- Return values
-
external_function_parameters | |
- Since
- Moodle 3.2
◆ add_rating_returns()
static core_rating_external::add_rating_returns |
( |
| ) |
|
|
static |
Returns description of add_rating result values.
- Return values
-
external_single_structure | |
- Since
- Moodle 3.2
◆ get_item_ratings()
static core_rating_external::get_item_ratings |
( |
| $contextlevel, |
|
|
| $instanceid, |
|
|
| $component, |
|
|
| $ratingarea, |
|
|
| $itemid, |
|
|
| $scaleid, |
|
|
| $sort ) |
|
static |
Retrieve a list of ratings for a given item (forum post etc)
- Parameters
-
string | $contextlevel | course, module, user... |
int | $instanceid | the instance if for the context element |
string | $component | the name of the component |
string | $ratingarea | rating area |
int | $itemid | the item id |
int | $scaleid | the scale id |
string | $sort | sql order (firstname, rating or timemodified) |
- Return values
-
array | Result and possible warnings |
- Exceptions
-
- Since
- Moodle 2.9
◆ get_item_ratings_parameters()
static core_rating_external::get_item_ratings_parameters |
( |
| ) |
|
|
static |
Returns description of get_item_ratings parameters.
- Return values
-
external_function_parameters | |
- Since
- Moodle 2.9
◆ get_item_ratings_returns()
static core_rating_external::get_item_ratings_returns |
( |
| ) |
|
|
static |
Returns description of get_item_ratings result values.
- Return values
-
external_single_structure | |
- Since
- Moodle 2.9
The documentation for this class was generated from the following file:
- rating/classes/external.php