Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_assign\privacy\assignsubmission_provider Interface Reference
Inheritance diagram for mod_assign\privacy\assignsubmission_provider:
core_privacy\local\request\plugin\subplugin_provider core_privacy\local\request\shared_data_provider core_privacy\local\request\data_provider assignsubmission_comments\privacy\provider assignsubmission_file\privacy\provider assignsubmission_onlinetext\privacy\provider

Static Public Member Functions

static delete_submission_for_context (assign_plugin_request_data $requestdata)
 Any call to this method should delete all user data for the context defined in the deletion_criteria.
 
static delete_submission_for_userid (assign_plugin_request_data $exportdata)
 A call to this method should delete user data (where practicle) from the userid and context.
 
static export_submission_user_data (assign_plugin_request_data $exportdata)
 This method is used to export any user data this sub-plugin has using the assign_plugin_request_data object to get the context and userid.
 
static get_context_for_userid_within_submission (int $userid, contextlist $contextlist)
 Retrieves the contextids associated with the provided userid for this subplugin.
 
static get_student_user_ids (useridlist $useridlist)
 Returns student user ids related to the provided teacher ID.
 

Member Function Documentation

◆ delete_submission_for_context()

static mod_assign\privacy\assignsubmission_provider::delete_submission_for_context ( assign_plugin_request_data $requestdata)
static

Any call to this method should delete all user data for the context defined in the deletion_criteria.

assign_plugin_request_data contains:

  • context
  • assign object
Parameters
assign_plugin_request_data$requestdataInformation to use to delete user data for this submission.

Implemented in assignsubmission_comments\privacy\provider, assignsubmission_file\privacy\provider, and assignsubmission_onlinetext\privacy\provider.

◆ delete_submission_for_userid()

static mod_assign\privacy\assignsubmission_provider::delete_submission_for_userid ( assign_plugin_request_data $exportdata)
static

A call to this method should delete user data (where practicle) from the userid and context.

assign_plugin_request_data contains:

  • context
  • submission object
  • user object
  • assign object
Parameters
assign_plugin_request_data$exportdataDetails about the user and context to focus the deletion.

Implemented in assignsubmission_comments\privacy\provider, assignsubmission_file\privacy\provider, and assignsubmission_onlinetext\privacy\provider.

◆ export_submission_user_data()

static mod_assign\privacy\assignsubmission_provider::export_submission_user_data ( assign_plugin_request_data $exportdata)
static

This method is used to export any user data this sub-plugin has using the assign_plugin_request_data object to get the context and userid.

assign_plugin_request_data contains:

  • context
  • submission object
  • current path (subcontext)
  • user object
Parameters
assign_plugin_request_data$exportdataInformation to use to export user data for this sub-plugin.

Implemented in assignsubmission_comments\privacy\provider, assignsubmission_file\privacy\provider, and assignsubmission_onlinetext\privacy\provider.

◆ get_context_for_userid_within_submission()

static mod_assign\privacy\assignsubmission_provider::get_context_for_userid_within_submission ( int $userid,
contextlist $contextlist )
static

Retrieves the contextids associated with the provided userid for this subplugin.

NOTE if your subplugin must have an entry in the assign_submission table to work, then this method can be empty.

Parameters
int$useridThe user ID to get context IDs for.
core_privacy\local\request\contextlist$contextlistUse add_from_sql with this object to add your context IDs.

Implemented in assignsubmission_comments\privacy\provider, assignsubmission_file\privacy\provider, and assignsubmission_onlinetext\privacy\provider.

◆ get_student_user_ids()

static mod_assign\privacy\assignsubmission_provider::get_student_user_ids ( useridlist $useridlist)
static

Returns student user ids related to the provided teacher ID.

If it is possible that a student ID will not be returned by the sql query in mod_assign\privacy\provider\find_grader_info() Then you need to provide some sql to retrive those student IDs. This is highly likely if you had to fill in get_context_for_userid_within_submission above.

Parameters
useridlist$useridlistA user ID list object that you can append your user IDs to.

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