See Release Notes
Long Term Support Release
Privacy Subsystem implementation for mod_assignment.
Copyright: | 2018 Zig Tan <zig@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 548 lines (23 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
provider:: (14 methods):
get_metadata()
get_contexts_for_userid()
get_users_in_context()
export_user_data()
export_user_preferences()
delete_data_for_all_users_in_context()
delete_data_for_user()
delete_data_for_users()
has_marked_assignment_submissions()
get_assignment_by_context()
get_assignment_submissions_by_contextlist()
get_assignment_submissions_by_assignment()
get_assignment_output()
get_assignment_submission_output()
get_metadata(collection $collection) X-Ref |
Return the fields which contain personal data. param: collection $collection a reference to the collection to use to store the metadata. return: collection the updated collection of metadata items. |
get_contexts_for_userid(int $userid) X-Ref |
Get the list of contexts that contain user information for the specified user. param: int $userid the userid. return: contextlist the list of contexts containing user info for the user. |
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 personal data for the given approved_contextlist. User and context information is contained within the contextlist. param: approved_contextlist $contextlist a list of contexts approved for export. |
export_user_preferences(int $userid) X-Ref |
Stores the user preferences related to mod_assign. param: int $userid The user ID that we want the preferences 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 context to delete in. |
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 a list of contexts approved for deletion. |
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. |
has_marked_assignment_submissions($assignmentid, $userid) X-Ref |
Helper function to check if a user has marked assignment submissions for a given assignment. param: int $assignmentid The assignment ID to check if user has marked associated submissions. param: int $userid The user ID to check if user has marked associated submissions. return: bool If user has marked associated submissions returns true, otherwise false. |
get_assignment_by_context($context) X-Ref |
Helper function to return assignment for a context module. param: object $context The context module object to return the assignment record by. return: mixed The assignment details or null record associated with the context module. |
get_assignment_submissions_by_contextlist($contextlist, $userid, $teacher = false) X-Ref |
Helper function to return assignment submissions submitted by / marked by a user and their contextlist. param: object $contextlist Object with the contexts related to a userid to retrieve assignment submissions by. param: int $userid The user ID to find assignment submissions that were submitted by. param: bool $teacher The teacher status to determine if marked assignment submissions should be returned. return: array Array of assignment submission details. |
get_assignment_submissions_by_assignment($assignmentid, $userid, $teacher = false) X-Ref |
Helper function to retrieve assignment submissions submitted by / marked by a user for a specific assignment. param: int $assignmentid The assignment ID to retrieve assignment submissions by. param: int $userid The user ID to retrieve assignment submissions submitted / marked by. param: bool $teacher The teacher status to determine if marked assignment submissions should be returned. return: array Array of assignment submissions details. |
get_assignment_output($assignmentdata) X-Ref |
Helper function generate assignment output object for exporting. param: object $assignmentdata Object containing assignment data. return: object Formatted assignment output object for exporting. |
get_assignment_submission_output($submissiondata) X-Ref |
Helper function generate assignment submission output object for exporting. param: object $submissiondata Object containing assignment submission data. return: object Formatted assignment submission output for exporting. |