Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Static Protected Member Functions | List of all members
mod_assignment\privacy\provider Class Reference

Implementation of the privacy subsystem plugin provider for mod_assignment. More...

Inheritance diagram for mod_assignment\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 data for all users in the specified context. More...
 
static delete_data_for_user (approved_contextlist $contextlist)
 Delete all user data for the specified user, in the specified contexts. More...
 
static delete_data_for_users (approved_userlist $userlist)
 Delete multiple users within a single context. More...
 
static export_user_data (approved_contextlist $contextlist)
 Export personal data for the given approved_contextlist. More...
 
static export_user_preferences (int $userid)
 Stores the user preferences related to mod_assign. More...
 
static get_contexts_for_userid (int $userid)
 Get the list of contexts that contain user information for the specified user. More...
 
static get_metadata (collection $collection)
 Return the fields which contain personal data. More...
 
static get_users_in_context (userlist $userlist)
 Get the list of users who have data within a context. More...
 

Static Protected Member Functions

static get_assignment_by_context ($context)
 Helper function to return assignment for a context module. More...
 
static get_assignment_output ($assignmentdata)
 Helper function generate assignment output object for exporting. More...
 
static get_assignment_submission_output ($submissiondata)
 Helper function generate assignment submission output object for exporting. More...
 
static get_assignment_submissions_by_assignment ($assignmentid, $userid, $teacher=false)
 Helper function to retrieve assignment submissions submitted by / marked by a user for a specific assignment. More...
 
static get_assignment_submissions_by_contextlist ($contextlist, $userid, $teacher=false)
 Helper function to return assignment submissions submitted by / marked by a user and their contextlist. More...
 
static has_marked_assignment_submissions ($assignmentid, $userid)
 Helper function to check if a user has marked assignment submissions for a given assignment. More...
 

Detailed Description

Implementation of the privacy subsystem plugin provider for mod_assignment.

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_assignment\privacy\provider::delete_data_for_all_users_in_context ( \context  $context)
static

Delete all data for all users in the specified context.

Parameters
context$contextthe context to delete in.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_user()

static mod_assignment\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$contextlista list of contexts approved for deletion.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_users()

static mod_assignment\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.

◆ export_user_data()

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

Export personal data for the given approved_contextlist.

User and context information is contained within the contextlist.

Parameters
approved_contextlist$contextlista list of contexts approved for export.

Implements core_privacy\local\request\core_user_data_provider.

◆ export_user_preferences()

static mod_assignment\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_assignment_by_context()

static mod_assignment\privacy\provider::get_assignment_by_context (   $context)
staticprotected

Helper function to return assignment for a context module.

Parameters
object$contextThe context module object to return the assignment record by.
Return values
mixedThe assignment details or null record associated with the context module.
Exceptions
dml_exception

◆ get_assignment_output()

static mod_assignment\privacy\provider::get_assignment_output (   $assignmentdata)
staticprotected

Helper function generate assignment output object for exporting.

Parameters
object$assignmentdataObject containing assignment data.
Return values
objectFormatted assignment output object for exporting.

◆ get_assignment_submission_output()

static mod_assignment\privacy\provider::get_assignment_submission_output (   $submissiondata)
staticprotected

Helper function generate assignment submission output object for exporting.

Parameters
object$submissiondataObject containing assignment submission data.
Return values
objectFormatted assignment submission output for exporting.

◆ get_assignment_submissions_by_assignment()

static mod_assignment\privacy\provider::get_assignment_submissions_by_assignment (   $assignmentid,
  $userid,
  $teacher = false 
)
staticprotected

Helper function to retrieve assignment submissions submitted by / marked by a user for a specific assignment.

Parameters
int$assignmentidThe assignment ID to retrieve assignment submissions by.
int$useridThe user ID to retrieve assignment submissions submitted / marked by.
bool$teacherThe teacher status to determine if marked assignment submissions should be returned.
Return values
arrayArray of assignment submissions details.
Exceptions
dml_exception

◆ get_assignment_submissions_by_contextlist()

static mod_assignment\privacy\provider::get_assignment_submissions_by_contextlist (   $contextlist,
  $userid,
  $teacher = false 
)
staticprotected

Helper function to return assignment submissions submitted by / marked by a user and their contextlist.

Parameters
object$contextlistObject with the contexts related to a userid to retrieve assignment submissions by.
int$useridThe user ID to find assignment submissions that were submitted by.
bool$teacherThe teacher status to determine if marked assignment submissions should be returned.
Return values
arrayArray of assignment submission details.
Exceptions
coding_exception
dml_exception

◆ get_contexts_for_userid()

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

Get the list of contexts that contain user information for the specified user.

Parameters
int$useridthe userid.
Return values
contextlistthe list of contexts containing user info for the user.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_metadata()

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

Return the fields which contain personal data.

Parameters
collection$collectiona reference to the collection to use to store the metadata.
Return values
collectionthe updated collection of metadata items.

Implements core_privacy\local\metadata\provider.

◆ get_users_in_context()

static mod_assignment\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.

◆ has_marked_assignment_submissions()

static mod_assignment\privacy\provider::has_marked_assignment_submissions (   $assignmentid,
  $userid 
)
staticprotected

Helper function to check if a user has marked assignment submissions for a given assignment.

Parameters
int$assignmentidThe assignment ID to check if user has marked associated submissions.
int$useridThe user ID to check if user has marked associated submissions.
Return values
boolIf user has marked associated submissions returns true, otherwise false.
Exceptions
dml_exception

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