Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]
Rating external API
Copyright: | 2015 Costantino Cito <ccito@cvaconsulting.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 309 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_rating_external:: (6 methods):
get_item_ratings_parameters()
get_item_ratings()
get_item_ratings_returns()
add_rating_parameters()
add_rating()
add_rating_returns()
Class: core_rating_external - X-Ref
Rating external functionsget_item_ratings_parameters() X-Ref |
Returns description of get_item_ratings parameters. return: external_function_parameters |
get_item_ratings($contextlevel, $instanceid, $component, $ratingarea, $itemid, $scaleid, $sort) X-Ref |
Retrieve a list of ratings for a given item (forum post etc) param: string $contextlevel course, module, user... param: int $instanceid the instance if for the context element param: string $component the name of the component param: string $ratingarea rating area param: int $itemid the item id param: int $scaleid the scale id param: string $sort sql order (firstname, rating or timemodified) return: array Result and possible warnings |
get_item_ratings_returns() X-Ref |
Returns description of get_item_ratings result values. return: external_single_structure |
add_rating_parameters() X-Ref |
Returns description of add_rating parameters. return: external_function_parameters |
add_rating($contextlevel, $instanceid, $component, $ratingarea, $itemid, $scaleid, $rating, $rateduserid,$aggregation = RATING_AGGREGATE_NONE) X-Ref |
Adds a rating to an item param: string $contextlevel course, module, user... param: int $instanceid the instance if for the context element param: string $component the name of the component param: string $ratingarea rating area param: int $itemid the item id param: int $scaleid the scale id param: int $rating the user rating param: int $rateduserid the rated user id param: int $aggregation the aggregation method return: array result and possible warnings |
add_rating_returns() X-Ref |
Returns description of add_rating result values. return: external_single_structure |