Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_assign\privacy\provider Class Reference

Privacy class for requesting user data. More...

Inheritance diagram for mod_assign\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\plugin\provider core_privacy\local\request\user_preference_provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\core_user_data_provider core_privacy\local\request\core_data_provider core_privacy\local\request\userlist_provider core_privacy\local\request\core_data_provider core_privacy\local\request\data_provider core_privacy\local\request\data_provider

Static Public Member Functions

static delete_data_for_all_users_in_context (\context $context)
 Delete all use data which matches the specified context.
 
static delete_data_for_user (approved_contextlist $contextlist)
 Delete all user data for the specified user, in the specified contexts.
 
static delete_data_for_users (approved_userlist $userlist)
 Delete multiple users within a single context.
 
static export_overrides (\context $context, assign $assign, stdClass $user)
 Export overrides for this assignment.
 
static export_user_data (approved_contextlist $contextlist)
 Write out the user data filtered by contexts.
 
static export_user_preferences (int $userid)
 Stores the user preferences related to mod_assign.
 
static get_contexts_for_userid (int $userid)
 Returns all of the contexts that has information relating to the userid.
 
static get_metadata (collection $collection)
 Provides meta data that is stored about a user with mod_assign.
 
static get_users_in_context (userlist $userlist)
 Get the list of users who have data within a context.
 

Public Attributes

const ASSIGNFEEDBACK_INTERFACE = 'mod_assign\privacy\assignfeedback_provider'
 Interface for all assign feedback sub-plugins.
 
const ASSIGNFEEDBACK_USER_INTERFACE = 'mod_assign\privacy\assignfeedback_user_provider'
 Interface for all assign feedback sub-plugins.
 
const ASSIGNSUBMISSION_INTERFACE = 'mod_assign\privacy\assignsubmission_provider'
 Interface for all assign submission sub-plugins.
 
const ASSIGNSUBMISSION_USER_INTERFACE = 'mod_assign\privacy\assignsubmission_user_provider'
 Interface for all assign submission sub-plugins.
 

Static Protected Member Functions

static delete_overrides_for_users (\assign $assign, array $userids=[])
 Deletes assignment overrides in bulk.
 
static export_grade_data (\stdClass $grade, context $context, array $currentpath)
 Formats and then exports the user's grade data.
 
static export_submission (\assign $assign, stdClass $user, context_module $context, array $path, bool $exportforteacher=false)
 Exports assignment submission data for a user.
 
static export_submission_data (\stdClass $submission, context $context, array $currentpath)
 Formats and then exports the user's submission data.
 
static get_graded_users (int $userid, assign $assign)
 Find out if this user has graded any users.
 
static store_assign_user_flags (\context $context, assign $assign, int $userid)
 Writes out various user meta data about the assignment.
 

Detailed Description

Privacy class for requesting user data.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ delete_data_for_all_users_in_context()

static mod_assign\privacy\provider::delete_data_for_all_users_in_context ( \context $context)
static

Delete all use data which matches the specified context.

Parameters
context$contextThe module context.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_user()

static mod_assign\privacy\provider::delete_data_for_user ( approved_contextlist $contextlist)
static

Delete all user data for the specified user, in the specified contexts.

Parameters
approved_contextlist$contextlistThe approved contexts and user information to delete information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_users()

static mod_assign\privacy\provider::delete_data_for_users ( approved_userlist $userlist)
static

Delete multiple users within a single context.

Parameters
approved_userlist$userlistThe approved context and user information to delete information for.

Implements core_privacy\local\request\core_userlist_provider.

◆ delete_overrides_for_users()

static mod_assign\privacy\provider::delete_overrides_for_users ( \assign $assign,
array $userids = [] )
staticprotected

Deletes assignment overrides in bulk.

Parameters
assign$assignThe assignment object
array$useridsAn array of user IDs

◆ export_grade_data()

static mod_assign\privacy\provider::export_grade_data ( \stdClass $grade,
context $context,
array $currentpath )
staticprotected

Formats and then exports the user's grade data.

Parameters
stdClass$gradeThe assign grade object
context$contextThe context object
array$currentpathCurrent directory path that we are exporting to.

◆ export_overrides()

static mod_assign\privacy\provider::export_overrides ( \context $context,
assign $assign,
stdClass $user )
static

Export overrides for this assignment.

Parameters
context$contextContext
assign$assignThe assign object.
stdClass$userThe user object.

◆ export_submission()

static mod_assign\privacy\provider::export_submission ( \assign $assign,
stdClass $user,
context_module $context,
array $path,
bool $exportforteacher = false )
staticprotected

Exports assignment submission data for a user.

Parameters
assign$assignThe assignment object
stdClass$userThe user object
context_module$contextThe context
array$pathThe path for exporting data
bool | boolean$exportforteacherA flag for if this is exporting data as a teacher.

◆ export_submission_data()

static mod_assign\privacy\provider::export_submission_data ( \stdClass $submission,
context $context,
array $currentpath )
staticprotected

Formats and then exports the user's submission data.

Parameters
stdClass$submissionThe assign submission object
context$contextThe context object
array$currentpathCurrent directory path that we are exporting to.

◆ export_user_data()

static mod_assign\privacy\provider::export_user_data ( approved_contextlist $contextlist)
static

Write out the user data filtered by contexts.

Parameters
approved_contextlist$contextlistcontexts that we are writing data out from.

Implements core_privacy\local\request\core_user_data_provider.

◆ export_user_preferences()

static mod_assign\privacy\provider::export_user_preferences ( int $userid)
static

Stores the user preferences related to mod_assign.

Parameters
int$useridThe user ID that we want the preferences for.

Implements core_privacy\local\request\user_preference_provider.

◆ get_contexts_for_userid()

static mod_assign\privacy\provider::get_contexts_for_userid ( int $userid)
static

Returns all of the contexts that has information relating to the userid.

Parameters
int$useridThe user ID.
Return values
contextlistan object with the contexts related to a userid.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_graded_users()

static mod_assign\privacy\provider::get_graded_users ( int $userid,
assign $assign )
staticprotected

Find out if this user has graded any users.

Parameters
int$useridThe user ID (potential teacher).
assign$assignThe assignment object.
Return values
arrayIf successful an array of objects with userids that this user graded, otherwise false.

◆ get_metadata()

static mod_assign\privacy\provider::get_metadata ( collection $collection)
static

Provides meta data that is stored about a user with mod_assign.

Parameters
collection$collectionA collection of meta data items to be added to.
Return values
collectionReturns the collection of metadata.

Implements core_privacy\local\metadata\provider.

◆ get_users_in_context()

static mod_assign\privacy\provider::get_users_in_context ( userlist $userlist)
static

Get the list of users who have data within a context.

Parameters
userlist$userlistThe userlist containing the list of users who have data in this context/plugin combination.

Implements core_privacy\local\request\core_userlist_provider.

◆ store_assign_user_flags()

static mod_assign\privacy\provider::store_assign_user_flags ( \context $context,
assign $assign,
int $userid )
staticprotected

Writes out various user meta data about the assignment.

Parameters
context$contextThe context of this assignment.
assign$assignThe assignment object.
int$useridThe user ID

Member Data Documentation

◆ ASSIGNFEEDBACK_USER_INTERFACE

const mod_assign\privacy\provider::ASSIGNFEEDBACK_USER_INTERFACE = 'mod_assign\privacy\assignfeedback_user_provider'

Interface for all assign feedback sub-plugins.

This allows for deletion of users with a context.

◆ ASSIGNSUBMISSION_USER_INTERFACE

const mod_assign\privacy\provider::ASSIGNSUBMISSION_USER_INTERFACE = 'mod_assign\privacy\assignsubmission_user_provider'

Interface for all assign submission sub-plugins.

This allows for deletion of users with a context.


The documentation for this class was generated from the following file: