Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Static Protected Member Functions | List of all members
mod_forum\privacy\provider Class Reference

Implementation of the privacy subsystem plugin provider for the forum activity module. More...

Inheritance diagram for mod_forum\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\plugin\provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\user_preference_provider core_privacy\local\request\core_user_data_provider core_privacy\local\request\userlist_provider core_privacy\local\request\core_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. 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 export_user_preferences (int $userid)
 Store all user preferences for the plugin. 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 $items)
 Returns meta data about this system. More...
 
static get_users_in_context (userlist $userlist)
 Get the list of users within a specific context. More...
 

Static Protected Member Functions

static export_all_posts (int $userid, array $mappings)
 Store all information about all posts that we have detected this user to have access to. More...
 
static export_all_posts_in_discussion (int $userid, context $context, stdClass $discussion)
 Store all information about all posts that we have detected this user to have access to. More...
 
static export_digest_data (int $userid, stdClass $forum, int $maildigest)
 Store data about daily digest preferences. More...
 
static export_discussion_data (int $userid, array $mappings)
 Store all information about all discussions that we have detected this user to have access to. More...
 
static export_discussion_subscription_data (int $userid, context_module $context, stdClass $discussion)
 Store data about whether the user subscribes to this particular discussion. More...
 
static export_grade_data (int $grade, context $context, stdClass $forum, array $path)
 
static export_grading_data (int $userid, stdClass $forum, int $grade)
 
static export_post_data (int $userid, context $context, $postarea, $post)
 Export all data in the post. More...
 
static export_posts_in_structure (int $userid, context $context, $parentarea, stdClass $structure)
 Export all posts in the provided structure. More...
 
static export_read_data (int $userid, context_module $context, array $postarea, stdClass $post)
 Store read-tracking information about a particular forum post. More...
 
static export_subscription_data (int $userid, stdClass $forum, int $subscribed)
 Store data about whether the user subscribes to forum. More...
 
static export_tracking_data (int $userid, stdClass $forum, int $tracked)
 Store forum read-tracking data about a particular forum. More...
 

Detailed Description

Implementation of the privacy subsystem plugin provider for the forum activity module.

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_forum\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_forum\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_forum\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_all_posts()

static mod_forum\privacy\provider::export_all_posts ( int  $userid,
array  $mappings 
)
staticprotected

Store all information about all posts that we have detected this user to have access to.

Parameters
int$useridThe userid of the user whose data is to be exported.
array$mappingsA list of mappings from forumid => contextid.
Return values
arrayWhich forums had data written for them.

◆ export_all_posts_in_discussion()

static mod_forum\privacy\provider::export_all_posts_in_discussion ( int  $userid,
context  $context,
stdClass  $discussion 
)
staticprotected

Store all information about all posts that we have detected this user to have access to.

Parameters
int$useridThe userid of the user whose data is to be exported.
context$contextThe instance of the forum context.
stdClass$discussionThe discussion whose data is being exported.

◆ export_digest_data()

static mod_forum\privacy\provider::export_digest_data ( int  $userid,
stdClass  $forum,
int  $maildigest 
)
staticprotected

Store data about daily digest preferences.

Parameters
int$useridThe userid of the user whose data is to be exported.
stdClass$forumThe forum whose data is being exported.
int$maildigestThe mail digest setting for this forum.
Return values
boolWhether any data was stored.

◆ export_discussion_data()

static mod_forum\privacy\provider::export_discussion_data ( int  $userid,
array  $mappings 
)
staticprotected

Store all information about all discussions that we have detected this user to have access to.

Parameters
int$useridThe userid of the user whose data is to be exported.
array$mappingsA list of mappings from forumid => contextid.
Return values
arrayWhich forums had data written for them.

◆ export_discussion_subscription_data()

static mod_forum\privacy\provider::export_discussion_subscription_data ( int  $userid,
context_module  $context,
stdClass  $discussion 
)
staticprotected

Store data about whether the user subscribes to this particular discussion.

Parameters
int$useridThe userid of the user whose data is to be exported.
context_module$contextThe instance of the forum context.
stdClass$discussionThe discussion whose data is being exported.
Return values
boolWhether any data was stored.

◆ export_post_data()

static mod_forum\privacy\provider::export_post_data ( int  $userid,
context  $context,
  $postarea,
  $post 
)
staticprotected

Export all data in the post.

Parameters
int$useridThe userid of the user whose data is to be exported.
context$contextThe instance of the forum context.
array$postareaThe subcontext of the parent.
stdClass$postThe post structure and all of its children

◆ export_posts_in_structure()

static mod_forum\privacy\provider::export_posts_in_structure ( int  $userid,
context  $context,
  $parentarea,
stdClass  $structure 
)
staticprotected

Export all posts in the provided structure.

Parameters
int$useridThe userid of the user whose data is to be exported.
context$contextThe instance of the forum context.
array$parentareaThe subcontext of the parent.
stdClass$structureThe post structure and all of its children

◆ export_read_data()

static mod_forum\privacy\provider::export_read_data ( int  $userid,
context_module  $context,
array  $postarea,
stdClass  $post 
)
staticprotected

Store read-tracking information about a particular forum post.

Parameters
int$useridThe userid of the user whose data is to be exported.
context_module$contextThe instance of the forum context.
array$postareaThe subcontext for this post.
stdClass$postThe post whose data is being exported.
Return values
boolWhether any data was stored.

◆ export_subscription_data()

static mod_forum\privacy\provider::export_subscription_data ( int  $userid,
stdClass  $forum,
int  $subscribed 
)
staticprotected

Store data about whether the user subscribes to forum.

Parameters
int$useridThe userid of the user whose data is to be exported.
stdClass$forumThe forum whose data is being exported.
int$subscribedif the user is subscribed
Return values
boolWhether any data was stored.

◆ export_tracking_data()

static mod_forum\privacy\provider::export_tracking_data ( int  $userid,
stdClass  $forum,
int  $tracked 
)
staticprotected

Store forum read-tracking data about a particular forum.

This is whether a forum has read-tracking enabled or not.

Parameters
int$useridThe userid of the user whose data is to be exported.
stdClass$forumThe forum whose data is being exported.
int$trackeif the user is subscribed
Return values
boolWhether any data was stored.

◆ export_user_data()

static mod_forum\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 mod_forum\privacy\provider::export_user_preferences ( int  $userid)
static

Store 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 mod_forum\privacy\provider::get_contexts_for_userid ( int  $userid)
static

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

In the case of forum, that is any forum where the user has made any post, rated any content, or has any preferences.

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

Returns meta data about this system.

Parameters
collection$itemsThe 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_forum\privacy\provider::get_users_in_context ( userlist  $userlist)
static

Get the list of users within a specific 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: