Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_xapi\privacy\provider Class Reference
Inheritance diagram for core_xapi\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\subsystem\plugin_provider core_privacy\local\request\shared_userlist_provider core_privacy\local\request\shared_data_provider core_privacy\local\request\userlist_provider core_privacy\local\request\data_provider

Static Public Member Functions

static add_contexts_for_userid (core_privacy\local\request\contextlist $contextlist, int $userid, string $component)
 Provide a list of contexts which have xAPI for the user, in the respective area (component/itemtype combination).
 
static add_userids_for_context (\core_privacy\local\request\userlist $userlist)
 Add users to a userlist who have xAPI within the specified context.
 
static delete_states_for_all_users (\context $context, string $component)
 Delete all xAPI states for all users in the specified contexts, and component area.
 
static delete_states_for_user (approved_contextlist $contextlist, string $component, int $itemid=0)
 Delete all xAPI states for the specified user, in the specified contexts.
 
static delete_states_for_userlist (\core_privacy\local\request\approved_userlist $userlist, int $itemid=0)
 Delete all xAPI states for the specified users in the specified context, component area and item type.
 
static get_metadata (collection $collection)
 Return the fields which contain personal data.
 
static get_xapi_states_for_user (int $userid, string $component, int $itemid)
 Get xAPI states data for the specified user in the specified component and item ID.
 

Detailed Description

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_contexts_for_userid()

static core_xapi\privacy\provider::add_contexts_for_userid ( core_privacy\local\request\contextlist $contextlist,
int $userid,
string $component )
static

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.

Parameters
core_privacy\local\request\contextlist$contextlist
int$useridThe id of the user in scope.
string$componentthe frankenstyle component name.

◆ add_userids_for_context()

static core_xapi\privacy\provider::add_userids_for_context ( \core_privacy\local\request\userlist $userlist)
static

Add users to a userlist who have xAPI within the specified context.

Parameters
core_privacy\local\request\userlist$userlistThe userlist to add the users to.
Return values
void

◆ delete_states_for_all_users()

static core_xapi\privacy\provider::delete_states_for_all_users ( \context $context,
string $component )
static

Delete all xAPI states for all users in the specified contexts, and component area.

Parameters
context$contextThe context to which deletion is scoped.
string$componentThe component name.
Exceptions
dml_exceptionif any errors are encountered during deletion.

◆ delete_states_for_user()

static core_xapi\privacy\provider::delete_states_for_user ( approved_contextlist $contextlist,
string $component,
int $itemid = 0 )
static

Delete all xAPI states for the specified user, in the specified contexts.

Parameters
approved_contextlist$contextlistThe approved contexts and user information to delete information for.
string$componentThe component name.
int$itemidOptional itemid associated with component.
Exceptions
coding_exception
dml_exception

◆ delete_states_for_userlist()

static core_xapi\privacy\provider::delete_states_for_userlist ( \core_privacy\local\request\approved_userlist $userlist,
int $itemid = 0 )
static

Delete all xAPI states for the specified users in the specified context, component area and item type.

Parameters
core_privacy\local\request\approved_userlist$userlistThe approved contexts and user information to delete information for.
int$itemidOptional itemid associated with component.
Exceptions
dml_exceptionif any errors are encountered during deletion.

◆ get_metadata()

static core_xapi\privacy\provider::get_metadata ( collection $collection)
static

Return the fields which contain personal data.

Parameters
collection$collectionThe initialised collection to add items to.
Return values
collectionA listing of user data stored through this system.

Implements core_privacy\local\metadata\provider.

◆ get_xapi_states_for_user()

static core_xapi\privacy\provider::get_xapi_states_for_user ( int $userid,
string $component,
int $itemid )
static

Get xAPI states data for the specified user in the specified component and item ID.

Parameters
int$useridThe id of the user in scope.
string$componentThe component name.
int$itemidThe item ID.
Return values
array|null

The documentation for this class was generated from the following file: