Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core_course\privacy\provider Class Reference

Privacy class for requesting user data. More...

Inheritance diagram for core_course\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\context_aware_provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\plugin\provider core_privacy\local\request\user_preference_provider core_privacy\local\request\core_data_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 core_privacy\local\request\core_data_provider core_privacy\local\request\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_context_data (\core_privacy\local\request\contextlist_collection $contextlistcollection)
 Give the component a chance to include any contextual information deemed relevant to any child contexts which are exporting personal data.
 
static export_context_data (\core_privacy\local\request\contextlist_collection $contextcollection)
 Give the component a chance to include any contextual information deemed relevant to any child contexts which are exporting personal data.
 
static export_user_data (approved_contextlist $contextlist)
 Export all user data for the specified user, in the specified contexts.
 
static export_user_preferences (int $userid)
 Export all user preferences for the plugin.
 
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)
 Returns meta data about this system.
 
static get_users_in_context (userlist $userlist)
 Get the list of users who have data within a context.
 

Detailed Description

Privacy class for requesting user data.

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

Member Function Documentation

◆ delete_data_for_all_users_in_context()

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

Delete all data for all users in the specified context.

Parameters
context$contextThe specific context to delete data for.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_user()

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

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

Parameters
approved_contextlist$contextlistThe approved contexts and user information to delete information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_users()

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

Delete multiple users within a single context.

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

Implements core_privacy\local\request\core_userlist_provider.

◆ export_context_data() [1/2]

static core_course\privacy\provider::export_context_data ( \core_privacy\local\request\contextlist_collection $contextlistcollection)
static

Give the component a chance to include any contextual information deemed relevant to any child contexts which are exporting personal data.

By giving the component access to the full list of contexts being exported across all components, it can determine whether a descendant context is being exported, and decide whether to add relevant contextual information about itself. Having access to the full list of contexts being exported is what makes this component a context aware provider.

E.g. If, during the core export process, a course module is included in the contextlist_collection but the course containing the module is not (perhaps there's no longer a user enrolment), then the course should include general contextual information in the export so we know basic details about which course the module belongs to. This method allows the course to make that decision, based on the existence of any decendant module contexts in the collection.

Parameters
core_privacy\local\request\contextlist_collection$contextlistcollection

◆ export_context_data() [2/2]

static core_privacy\local\request\context_aware_provider::export_context_data ( \core_privacy\local\request\contextlist_collection $contextcollection)
staticinherited

Give the component a chance to include any contextual information deemed relevant to any child contexts which are exporting personal data.

By giving the component access to the full list of contexts being exported across all components, it can determine whether a descendant context is being exported, and decide whether to add relevant contextual information about itself. Having access to the full list of contexts being exported is what makes this component a context aware provider.

Parameters
core_privacy\local\request\contextlist_collection$contextcollectionThe collection of approved context lists.

◆ export_user_data()

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

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

Parameters
approved_contextlist$contextlistThe approved contexts to export information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ export_user_preferences()

static core_course\privacy\provider::export_user_preferences ( int $userid)
static

Export all user preferences for the plugin.

Parameters
int$useridThe userid of the user whose data is to be exported.

Implements core_privacy\local\request\user_preference_provider.

◆ get_contexts_for_userid()

static core_course\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 user to search.
Return values
contextlist\$contextlistThe contextlist containing the list of contexts used in this plugin.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_metadata()

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

Returns meta data about this system.

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 core_course\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: