Statement agent (user) object for xAPI structure checking and usage.
Copyright: | 2020 Ferran Recio |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 142 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
item_agent:: (5 methods):
__construct()
create_from_data()
create_from_user()
get_user()
get_all_users()
Class: item_agent - X-Ref
Agent xAPI statement element representing a Moodle user.__construct(stdClass $data, stdClass $user) X-Ref |
Function to create an agent (user) from part of the xAPI statement. param: stdClass $data the original xAPI element param: stdClass $user user record |
create_from_data(stdClass $data) X-Ref |
Function to create an item from part of the xAPI statement. param: stdClass $data the original xAPI element return: item item_agentxAPI generated |
create_from_user(stdClass $user) X-Ref |
Create a item_agent from a existing user. param: stdClass $user A user record. return: item_agent |
get_user() X-Ref |
Returns the moodle user represented by this item. return: stdClass user record |
get_all_users() X-Ref |
Return all users represented by this item. In this case the item is an agent so a single element array will be returned always. return: array list of users |