Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

(no description)

File Size: 228 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider  - X-Ref

Privacy implementation for core xAPI Library.

get_metadata(collection $collection)   X-Ref
Return the fields which contain personal data.

param: collection $collection The initialised collection to add items to.
return: collection A listing of user data stored through this system.

add_contexts_for_userid(\core_privacy\local\request\contextlist $contextlist,int $userid,string $component)   X-Ref
Provide a list of contexts which have xAPI for the user, in the respective area (component/itemtype combination).

This method is to be called by consumers of the xAPI subsystem (plugins), in their get_contexts_for_userid() method,
to add the contexts for items which may have xAPI data, but would normally not be reported as having user data by the
plugin responsible for them.

param: \core_privacy\local\request\contextlist $contextlist
param: int $userid The id of the user in scope.
param: string $component the frankenstyle component name.

add_userids_for_context(\core_privacy\local\request\userlist $userlist)   X-Ref
Add users to a userlist who have xAPI within the specified context.

param: \core_privacy\local\request\userlist $userlist The userlist to add the users to.
return: void

get_xapi_states_for_user(int $userid, string $component, int $itemid)   X-Ref
Get xAPI states data for the specified user in the specified component and item ID.

param: int $userid The id of the user in scope.
param: string $component The component name.
param: int $itemid The item ID.
return: array|null

delete_states_for_all_users(\context $context, string $component)   X-Ref
Delete all xAPI states for all users in the specified contexts, and component area.

param: \context $context The context to which deletion is scoped.
param: string $component The component name.

delete_states_for_userlist(\core_privacy\local\request\approved_userlist $userlist, int $itemid = 0)   X-Ref
Delete all xAPI states for the specified users in the specified context, component area and item type.

param: \core_privacy\local\request\approved_userlist $userlist The approved contexts and user information
param: int $itemid Optional itemid associated with component.

delete_states_for_user(approved_contextlist $contextlist, string $component, int $itemid = 0)   X-Ref
Delete all xAPI states for the specified user, in the specified contexts.

param: approved_contextlist $contextlist The approved contexts and user information to delete information for.
param: string $component The component name.
param: int $itemid Optional itemid associated with component.