Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Privacy Subsystem implementation for core_group.

Copyright: 2018 Shamim Rezaie <shamim@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 400 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider  - X-Ref

Privacy Subsystem implementation for core_group.

get_metadata(collection $collection)   X-Ref
Returns meta data about this system.

return: collection A listing of user data stored through this system.
param: collection $collection The initialised collection to add items to.

export_groups(\context $context, string $component, array $subcontext = [], int $itemid = 0)   X-Ref
Writes user data to the writer for the user to download.

param: \context  $context    The context to export data for.
param: string    $component  The component that is calling this function. Empty string means no component.
param: array     $subcontext The sub-context in which to export this data.
param: int       $itemid     Optional itemid associated with component.

delete_groups_for_all_users(\context $context, string $component, int $itemid = 0)   X-Ref
Deletes all group memberships for a specified context and component.

param: \context  $context    Details about which context to delete group memberships for.
param: string    $component  Component to delete. Empty string means no component (manual group memberships).
param: int       $itemid     Optional itemid associated with component.

delete_groups_for_user(approved_contextlist $contextlist, string $component, int $itemid = 0)   X-Ref
Deletes all records for a user from a list of approved contexts.

param: approved_contextlist  $contextlist    Contains the user ID and a list of contexts to be deleted from.
param: string                $component      Component to delete from. Empty string means no component (manual memberships).
param: int                   $itemid         Optional itemid associated with component.

get_group_members_in_context(userlist $userlist, string $component, int $itemid = 0)   X-Ref
Add the list of users who are members of some groups in the specified constraints.

param: userlist    $userlist   The userlist to add the users to.
param: string      $component  The component to check.
param: int         $itemid     Optional itemid associated with component.

delete_groups_for_users(approved_userlist $userlist, string $component, int $itemid = 0)   X-Ref
Deletes all records for multiple users within a single context.

param: approved_userlist $userlist   The approved context and user information to delete information for.
param: string            $component  Component to delete from. Empty string means no component (manual memberships).
param: int               $itemid     Optional itemid associated with component.

get_contexts_for_group_member(int $userid, string $component, int $itemid = 0)   X-Ref
Get the list of contexts that contain group membership for the specified user.

return: contextlist         The contextlist containing the list of contexts.
param: int     $userid     The user to search.
param: string  $component  The component to check.
param: int     $itemid     Optional itemid associated with component.

get_contexts_for_userid(int $userid)   X-Ref
Get the list of users who have data within a context.

return: contextlist The contextlist containing the list of contexts used in this plugin.
param: int $userid The user to search.

get_users_in_context(userlist $userlist)   X-Ref
Get the list of users who have data within a context.

param: userlist    $userlist   The userlist containing the list of users who have data in this context/plugin combination.

export_user_data(approved_contextlist $contextlist)   X-Ref
Export all user data for the specified user, in the specified contexts.

param: approved_contextlist $contextlist The approved contexts to export information for.

delete_data_for_all_users_in_context(\context $context)   X-Ref
Delete all data for all users in the specified context.

param: context $context The specific context to delete data for.

delete_data_for_user(approved_contextlist $contextlist)   X-Ref
Delete all user data for the specified user, in the specified contexts.

param: approved_contextlist $contextlist The approved contexts and user information to delete information for.

delete_data_for_users(approved_userlist $userlist)   X-Ref
Delete multiple users within a single context.

param: approved_userlist   $userlist   The approved context and user information to delete information for.