Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
mod_assign\privacy\assign_plugin_request_data Class Reference

An object for fulfilling an assign plugin data request. More...

Public Member Functions

 __construct (\context $context, assign $assign, stdClass $pluginobject=null, array $subcontext=[], stdClass $user=null)
 Object creator for assign plugin request data.
 
 get_assign ()
 Getter for this attribute.
 
 get_assignid ()
 A method to conveniently fetch the assign id.
 
 get_context ()
 Getter for this attribute.
 
 get_gradeids ()
 Returns the grade IDs related to the user IDs.
 
 get_grades ()
 Returns the grades related to the user IDs.
 
 get_pluginobject ()
 Getter for this attribute.
 
 get_subcontext ()
 Getter for this attribute.
 
 get_submissionids ()
 Returns all of the submission IDs.
 
 get_submissions ()
 Returns the submissions related to the user IDs.
 
 get_user ()
 Getter for this attribute.
 
 get_userids ()
 Get all of the user IDs.
 
 populate_submissions_and_grades ()
 Fetches all of the submissions and grades related to the User IDs provided.
 
 set_userids (array $userids)
 Method for adding an array of user IDs.
 

Protected Attributes

assign $assign
 The assign object.
 
context $context
 The context that we are dealing with.
 
array $grades = []
 The grades related to the users added.
 
object $pluginobject
 For submisisons the submission object, for feedback the grade object.
 
array $subcontext
 The path or location that we are exporting data to.
 
array $submissions = []
 The submissions related to the users added.
 
object $user
 If set then only export data related directly to this user.
 
array $userids
 The user IDs of the users that will be affected.
 

Detailed Description

An object for fulfilling an assign plugin data request.

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

Constructor & Destructor Documentation

◆ __construct()

mod_assign\privacy\assign_plugin_request_data::__construct ( \context $context,
assign $assign,
stdClass $pluginobject = null,
array $subcontext = [],
stdClass $user = null )

Object creator for assign plugin request data.

Parameters
context$contextContext object.
stdClass$pluginobjectThe grade object.
array$subcontextDirectory / file location.
stdClass$userThe user object.
assign$assignThe assign object.

Member Function Documentation

◆ get_assign()

mod_assign\privacy\assign_plugin_request_data::get_assign ( )

Getter for this attribute.

Return values
assignThe assign object.

◆ get_assignid()

mod_assign\privacy\assign_plugin_request_data::get_assignid ( )

A method to conveniently fetch the assign id.

Return values
intThe assign id.

◆ get_context()

mod_assign\privacy\assign_plugin_request_data::get_context ( )

Getter for this attribute.

Return values
contextContext

◆ get_gradeids()

mod_assign\privacy\assign_plugin_request_data::get_gradeids ( )

Returns the grade IDs related to the user IDs.

Return values
arrayUser grade IDs.

◆ get_grades()

mod_assign\privacy\assign_plugin_request_data::get_grades ( )

Returns the grades related to the user IDs.

Return values
arrayUser grades.

◆ get_pluginobject()

mod_assign\privacy\assign_plugin_request_data::get_pluginobject ( )

Getter for this attribute.

Return values
objectThe assign plugin object

◆ get_subcontext()

mod_assign\privacy\assign_plugin_request_data::get_subcontext ( )

Getter for this attribute.

Return values
arrayThe location (path) that this data is being writter to.

◆ get_submissionids()

mod_assign\privacy\assign_plugin_request_data::get_submissionids ( )

Returns all of the submission IDs.

Return values
arraysubmission IDs

◆ get_submissions()

mod_assign\privacy\assign_plugin_request_data::get_submissions ( )

Returns the submissions related to the user IDs.

Return values
arrayUser submissions.

◆ get_user()

mod_assign\privacy\assign_plugin_request_data::get_user ( )

Getter for this attribute.

Return values
objectThe user id. If set then only information directly related to this user ID will be returned.

◆ get_userids()

mod_assign\privacy\assign_plugin_request_data::get_userids ( )

Get all of the user IDs.

Return values
arrayUser IDs

◆ populate_submissions_and_grades()

mod_assign\privacy\assign_plugin_request_data::populate_submissions_and_grades ( )

Fetches all of the submissions and grades related to the User IDs provided.

Use get_grades, get_submissions etc to retrieve this information.

◆ set_userids()

mod_assign\privacy\assign_plugin_request_data::set_userids ( array $userids)

Method for adding an array of user IDs.

This will do a query to populate the submissions and grades for these users.

Parameters
array$useridsUser IDs to do something with.

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