Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
tool_policy\privacy\provider Class Reference

Implementation of the privacy subsystem plugin provider for the policy tool. More...

Inheritance diagram for tool_policy\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\plugin\provider core_privacy\local\request\userlist_provider core_privacy\local\request\core_user_data_provider core_privacy\local\request\core_data_provider core_privacy\local\request\data_provider

Static Public Member Functions

static delete_data_for_all_users_in_context (\context $context)
 Delete all data for all users in the specified context.
 
static delete_data_for_user (approved_contextlist $contextlist)
 Delete all user data for the specified user, in the specified contexts.
 
static delete_data_for_users (approved_userlist $userlist)
 Delete multiple users within a single context.
 
static export_user_data (approved_contextlist $contextlist)
 Export personal data for the given approved_contextlist.
 
static get_contexts_for_userid (int $userid)
 Get the list of contexts that contain user information for the specified user.
 
static get_metadata (collection $collection)
 Return the fields which contain personal data.
 
static get_users_in_context (userlist $userlist)
 Get the list of users who have data within a context.
 

Static Protected Member Functions

static export_authored_policies (\stdClass $user)
 Export all policy agreements that the user authored.
 
static export_policy_agreements_for_context (\context_user $context)
 Export all policy agreements relating to the specified user context.
 

Detailed Description

Implementation of the privacy subsystem plugin provider for the policy tool.

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

Member Function Documentation

◆ delete_data_for_all_users_in_context()

static tool_policy\privacy\provider::delete_data_for_all_users_in_context ( \context $context)
static

Delete all data for all users in the specified context.

We never delete user agreements to the policies because they are part of privacy data. We never delete policy versions because they are part of privacy data.

Parameters
context$contextThe context to delete in.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_user()

static tool_policy\privacy\provider::delete_data_for_user ( approved_contextlist $contextlist)
static

Delete all user data for the specified user, in the specified contexts.

We never delete user agreements to the policies because they are part of privacy data. We never delete policy versions because they are part of privacy data.

Parameters
approved_contextlist$contextlistA list of contexts approved for deletion.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_users()

static tool_policy\privacy\provider::delete_data_for_users ( approved_userlist $userlist)
static

Delete multiple users within a single context.

We never delete user agreements to the policies because they are part of privacy data. We never delete policy versions because they are part of privacy data.

Parameters
approved_userlist$userlistThe approved context and user information to delete information for.

Implements core_privacy\local\request\core_userlist_provider.

◆ export_authored_policies()

static tool_policy\privacy\provider::export_authored_policies ( \stdClass $user)
staticprotected

Export all policy agreements that the user authored.

Parameters
stdClass$userThe user who has created the policies to export.

◆ export_policy_agreements_for_context()

static tool_policy\privacy\provider::export_policy_agreements_for_context ( \context_user $context)
staticprotected

Export all policy agreements relating to the specified user context.

Parameters
context_user$contextThe context to export

◆ export_user_data()

static tool_policy\privacy\provider::export_user_data ( approved_contextlist $contextlist)
static

Export personal data for the given approved_contextlist.

User and context information is contained within the contextlist.

Parameters
approved_contextlist$contextlistA list of contexts approved for export.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_contexts_for_userid()

static tool_policy\privacy\provider::get_contexts_for_userid ( int $userid)
static

Get the list of contexts that contain user information for the specified user.

Parameters
int$useridThe userid.
Return values
contextlistThe list of contexts containing user info for the user.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_metadata()

static tool_policy\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_users_in_context()

static tool_policy\privacy\provider::get_users_in_context ( userlist $userlist)
static

Get the list of users who have data within a context.

Parameters
userlist$userlistThe userlist containing the list of users who have data in this context/plugin combination.

Implements core_privacy\local\request\core_userlist_provider.


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