Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Privacy class for requesting user data.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 170 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

provider:: (4 methods):
  get_metadata()
  get_user_contexts_with_script()
  export_userkeys()
  delete_userkeys()


Class: provider  - X-Ref

Privacy class for requesting user data.

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

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

get_user_contexts_with_script(userlist $userlist, \context $context, string $script,int $instance = null)   X-Ref
Get the list of users within a specific context for this system.

param: userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
param: context $context The context.
param: string $script The unique target identifier.
param: int $instance The instance ID.

export_userkeys(\context $context, array $subcontext, string $script, $instance = null)   X-Ref
Exports the data relating to user keys for the specified scripts and instance, within the specified
context/subcontext.

param: \context         $context Context owner of the data.
param: array            $subcontext Context owner of the data.
param: string           $script The owner of the data (usually a component name).
param: int              $instance The instance owner of the data.

delete_userkeys(string $script, $userid = null, $instance = null)   X-Ref
Deletes all userkeys for a script.

param: string           $script The owner of the data (usually a component name).
param: int              $userid The owner of the data.
param: int              $instance The instance owner of the data.