Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Privacy class for requesting user data.

Copyright: 2018 Adrian Greeve <adrian@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 201 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider  - X-Ref

Privacy class for requesting user data.

get_metadata(collection $collection)   X-Ref
Return meta data about this plugin.

param: collection $collection A list of information to add to.
return: collection Return the collection after adding to it.

get_context_for_userid_within_submission(int $userid, contextlist $contextlist)   X-Ref
This is covered by mod_assign provider and the query on assign_submissions.

param: int $userid The user ID that we are finding contexts for.
param: contextlist $contextlist A context list to add sql and params to for contexts.

get_student_user_ids(\mod_assign\privacy\useridlist $useridlist)   X-Ref
This is also covered by the mod_assign provider and it's queries.

param: \mod_assign\privacy\useridlist $useridlist An object for obtaining user IDs of students.

get_userids_from_context(\core_privacy\local\request\userlist $userlist)   X-Ref
If you have tables that contain userids and you can generate entries in your tables without creating an
entry in the assign_submission table then please fill in this method.

param: \core_privacy\local\request\userlist $userlist The userlist object

export_submission_user_data(assign_plugin_request_data $exportdata)   X-Ref
Export all user data for this plugin.

param: assign_plugin_request_data $exportdata Data used to determine which context and user to export and other useful

delete_submission_for_context(assign_plugin_request_data $requestdata)   X-Ref
Any call to this method should delete all user data for the context defined in the deletion_criteria.

param: assign_plugin_request_data $requestdata Data useful for deleting user data from this sub-plugin.

delete_submission_for_userid(assign_plugin_request_data $deletedata)   X-Ref
A call to this method should delete user data (where practicle) from the userid and context.

param: assign_plugin_request_data $deletedata Details about the user and context to focus the deletion.

delete_submissions(assign_plugin_request_data $deletedata)   X-Ref
Deletes all submissions for the submission ids / userids provided in a context.
assign_plugin_request_data contains:
- context
- assign object
- submission ids (pluginids)
- user ids

param: assign_plugin_request_data $deletedata A class that contains the relevant information required for deletion.