Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]
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: | 675 lines (33 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
provider:: (15 methods):
get_metadata()
get_contexts_for_userid()
get_users_in_context()
export_user_data()
delete_data_for_all_users_in_context()
delete_data_for_user()
delete_data_for_users()
delete_overrides_for_users()
get_graded_users()
store_assign_user_flags()
export_grade_data()
export_submission_data()
export_user_preferences()
export_overrides()
export_submission()
get_metadata(collection $collection) X-Ref |
Provides meta data that is stored about a user with mod_assign param: collection $collection A collection of meta data items to be added to. return: collection Returns the collection of metadata. |
get_contexts_for_userid(int $userid) X-Ref |
Returns all of the contexts that has information relating to the userid. param: int $userid The user ID. return: contextlist an object with the contexts related to a userid. |
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 |
Write out the user data filtered by contexts. param: approved_contextlist $contextlist contexts that we are writing data out from. |
delete_data_for_all_users_in_context(\context $context) X-Ref |
Delete all use data which matches the specified context. param: \context $context The module context. |
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. |
delete_overrides_for_users(\assign $assign, array $userids = []) X-Ref |
Deletes assignment overrides in bulk param: \assign $assign The assignment object param: array $userids An array of user IDs |
get_graded_users(int $userid, \assign $assign) X-Ref |
Find out if this user has graded any users. param: int $userid The user ID (potential teacher). param: assign $assign The assignment object. return: array If successful an array of objects with userids that this user graded, otherwise false. |
store_assign_user_flags(\context $context, \assign $assign, int $userid) X-Ref |
Writes out various user meta data about the assignment. param: \context $context The context of this assignment. param: \assign $assign The assignment object. param: int $userid The user ID |
export_grade_data(\stdClass $grade, \context $context, array $currentpath) X-Ref |
Formats and then exports the user's grade data. param: \stdClass $grade The assign grade object param: \context $context The context object param: array $currentpath Current directory path that we are exporting to. |
export_submission_data(\stdClass $submission, \context $context, array $currentpath) X-Ref |
Formats and then exports the user's submission data. param: \stdClass $submission The assign submission object param: \context $context The context object param: array $currentpath Current directory path that we are exporting to. |
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. |
export_overrides(\context $context, \assign $assign, \stdClass $user) X-Ref |
Export overrides for this assignment. param: \context $context Context param: \assign $assign The assign object. param: \stdClass $user The user object. |
export_submission(\assign $assign, \stdClass $user, \context_module $context, array $path,bool $exportforteacher = false) X-Ref |
Exports assignment submission data for a user. param: \assign $assign The assignment object param: \stdClass $user The user object param: \context_module $context The context param: array $path The path for exporting data param: bool|boolean $exportforteacher A flag for if this is exporting data as a teacher. |