Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | Static Protected Member Functions | List of all members
mod_feedback\privacy\provider Class Reference

Data provider class. More...

Inheritance diagram for mod_feedback\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. More...
 
static delete_data_for_user (approved_contextlist $contextlist)
 Delete all user data for the specified user, in the specified contexts. More...
 
static delete_data_for_users (approved_userlist $userlist)
 Delete multiple users within a single context. More...
 
static export_user_data (approved_contextlist $contextlist)
 Export all user data for the specified user, in the specified contexts. More...
 
static get_contexts_for_userid (int $userid)
 Get the list of contexts that contain user information for the specified user. More...
 
static get_metadata (collection $collection)
 Returns metadata. More...
 
static get_users_in_context (userlist $userlist)
 Get the list of users who have data within a context. More...
 

Static Protected Member Functions

static extract_item_record_from_record (stdClass $record)
 Extract an item record from a database record. More...
 
static extract_value_record_from_record (stdClass $record)
 Extract a value record from a database record. More...
 
static prepare_export_query (array $contextids, $userid)
 Prepare the query to export all data. More...
 

Detailed Description

Data provider class.

Author
Frédéric Massart fred@.nosp@m.bran.nosp@m.chup..nosp@m.tech
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ delete_data_for_all_users_in_context()

static mod_feedback\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 mod_feedback\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 mod_feedback\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_user_data()

static mod_feedback\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.

◆ extract_item_record_from_record()

static mod_feedback\privacy\provider::extract_item_record_from_record ( stdClass  $record)
staticprotected

Extract an item record from a database record.

Parameters
stdClass$recordThe record.
Return values
Theitem record.

◆ extract_value_record_from_record()

static mod_feedback\privacy\provider::extract_value_record_from_record ( stdClass  $record)
staticprotected

Extract a value record from a database record.

Parameters
stdClass$recordThe record.
Return values
Thevalue record.

◆ get_contexts_for_userid()

static mod_feedback\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 mod_feedback\privacy\provider::get_metadata ( collection  $collection)
static

Returns metadata.

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 mod_feedback\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.

◆ prepare_export_query()

static mod_feedback\privacy\provider::prepare_export_query ( array  $contextids,
  $userid 
)
staticprotected

Prepare the query to export all data.

Doing it this way allows for merging all records from both the temporary and final tables as most of their columns are shared. It is a lot easier to deal with the records when exporting as we do not need to try to manually group the two types of submissions in the same reported dataset.

The ordering may affect performance on large datasets.

Parameters
array$contextidsThe context IDs.
int$useridThe user ID.
Return values
arrayWith SQL and params.

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