Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
tool_dataprivacy\external Class Reference

Class external. More...

Inheritance diagram for tool_dataprivacy\external:

Static Public Member Functions

static approve_data_request ($requestid)
 Approve a data request.
 
static approve_data_request_parameters ()
 Parameter description for approve_data_request().
 
static approve_data_request_returns ()
 Parameter description for approve_data_request().
 
static bulk_approve_data_requests ($requestids)
 Bulk approve bulk data request.
 
static bulk_approve_data_requests_parameters ()
 Parameter description for bulk_approve_data_requests().
 
static bulk_approve_data_requests_returns ()
 Parameter description for bulk_approve_data_requests().
 
static bulk_deny_data_requests ($requestids)
 Bulk deny data requests.
 
static bulk_deny_data_requests_parameters ()
 Parameter description for bulk_deny_data_requests().
 
static bulk_deny_data_requests_returns ()
 Parameter description for bulk_deny_data_requests().
 
static cancel_data_request ($requestid)
 Cancel a data request.
 
static cancel_data_request_parameters ()
 Parameter description for cancel_data_request().
 
static cancel_data_request_returns ()
 Parameter description for cancel_data_request().
 
static confirm_contexts_for_deletion ($ids)
 Confirm a given array of expired context record IDs.
 
static confirm_contexts_for_deletion_parameters ()
 Parameters for confirm_contexts_for_deletion().
 
static confirm_contexts_for_deletion_returns ()
 Returns for confirm_contexts_for_deletion().
 
static contact_dpo ($message)
 Make a general enquiry to a DPO.
 
static contact_dpo_parameters ()
 Parameter description for contact_dpo().
 
static contact_dpo_returns ()
 Parameter description for contact_dpo().
 
static create_category_form ($jsonformdata)
 Creates a data category from form data.
 
static create_category_form_parameters ()
 Parameter description for create_category_form().
 
static create_category_form_returns ()
 Returns for create_category_form().
 
static create_purpose_form ($jsonformdata)
 Creates a data purpose from form data.
 
static create_purpose_form_parameters ()
 Parameter description for create_purpose_form().
 
static create_purpose_form_returns ()
 Returns for create_purpose_form().
 
static delete_category ($id)
 Deletes a data category.
 
static delete_category_parameters ()
 Parameter description for delete_category().
 
static delete_category_returns ()
 Parameter description for delete_category().
 
static delete_purpose ($id)
 Deletes a data purpose.
 
static delete_purpose_parameters ()
 Parameter description for delete_purpose().
 
static delete_purpose_returns ()
 Parameter description for delete_purpose().
 
static deny_data_request ($requestid)
 Deny a data request.
 
static deny_data_request_parameters ()
 Parameter description for deny_data_request().
 
static deny_data_request_returns ()
 Parameter description for deny_data_request().
 
static get_activity_options ($nodefaults)
 Fetches a list of activity options for setting data registry defaults.
 
static get_activity_options_parameters ()
 Parameters for get_activity_options().
 
static get_activity_options_returns ()
 Returns for get_category_options().
 
static get_category_options ($includeinherit, $includenotset)
 Fetches a list of data category options containing category IDs as keys and the category name for the value.
 
static get_category_options_parameters ()
 Parameters for get_category_options().
 
static get_category_options_returns ()
 Returns for get_category_options().
 
static get_data_request ($requestid)
 Fetch the details of a user's data request.
 
static get_data_request_parameters ()
 Parameter description for get_data_request().
 
static get_data_request_returns ()
 Parameter description for get_data_request().
 
static get_purpose_options ($includeinherit, $includenotset)
 Fetches a list of data storage purposes containing purpose IDs as keys and the purpose name for the value.
 
static get_purpose_options_parameters ()
 Parameters for get_purpose_options().
 
static get_purpose_options_returns ()
 Returns for get_purpose_options().
 
static get_users ($query)
 Fetch the details of a user's data request.
 
static get_users_parameters ()
 Parameter description for get_data_request().
 
static get_users_returns ()
 Parameter description for get_users().
 
static mark_complete ($requestid)
 Mark a user's general enquiry's status as complete.
 
static mark_complete_parameters ()
 Parameter description for mark_complete().
 
static mark_complete_returns ()
 Parameter description for mark_complete().
 
static set_context_defaults ($contextlevel, $category, $purpose, $activity, $override)
 Updates the default category and purpose for a given context level (and optionally, a plugin).
 
static set_context_defaults_parameters ()
 Parameters for set_context_defaults().
 
static set_context_defaults_returns ()
 Returns for set_context_defaults().
 
static set_context_form ($jsonformdata)
 Creates a data category from form data.
 
static set_context_form_parameters ()
 Parameter description for set_context_form().
 
static set_context_form_returns ()
 Returns for set_context_form().
 
static set_contextlevel_form ($jsonformdata)
 Creates a data category from form data.
 
static set_contextlevel_form_parameters ()
 Parameter description for set_contextlevel_form().
 
static set_contextlevel_form_returns ()
 Returns for set_contextlevel_form().
 
static tree_extra_branches ($contextid, $element)
 Returns tree extra branches.
 
static tree_extra_branches_parameters ()
 Parameter description for tree_extra_branches().
 
static tree_extra_branches_returns ()
 Returns for tree_extra_branches().
 

Detailed Description

Class external.

The external API for the Data Privacy tool.

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

Member Function Documentation

◆ approve_data_request()

static tool_dataprivacy\external::approve_data_request ( $requestid)
static

Approve a data request.

Since
Moodle 3.5
Parameters
int$requestidThe request ID.
Return values
array
Exceptions
coding_exception
dml_exception
invalid_parameter_exception
restricted_context_exception
moodle_exception

◆ approve_data_request_parameters()

static tool_dataprivacy\external::approve_data_request_parameters ( )
static

Parameter description for approve_data_request().

Since
Moodle 3.5
Return values
external_function_parameters

◆ approve_data_request_returns()

static tool_dataprivacy\external::approve_data_request_returns ( )
static

Parameter description for approve_data_request().

Since
Moodle 3.5
Return values
core_external\external_description

◆ bulk_approve_data_requests()

static tool_dataprivacy\external::bulk_approve_data_requests ( $requestids)
static

Bulk approve bulk data request.

Since
Moodle 3.5
Parameters
array$requestidsArray consisting the request ID's.
Return values
array
Exceptions
coding_exception
dml_exception
invalid_parameter_exception
restricted_context_exception
moodle_exception

◆ bulk_approve_data_requests_parameters()

static tool_dataprivacy\external::bulk_approve_data_requests_parameters ( )
static

Parameter description for bulk_approve_data_requests().

Since
Moodle 3.5
Return values
external_function_parameters

◆ bulk_approve_data_requests_returns()

static tool_dataprivacy\external::bulk_approve_data_requests_returns ( )
static

Parameter description for bulk_approve_data_requests().

Since
Moodle 3.5
Return values
core_external\external_description

◆ bulk_deny_data_requests()

static tool_dataprivacy\external::bulk_deny_data_requests ( $requestids)
static

Bulk deny data requests.

Since
Moodle 3.5
Parameters
array$requestidsArray consisting of request ID's.
Return values
array
Exceptions
coding_exception
dml_exception
invalid_parameter_exception
restricted_context_exception
moodle_exception

◆ bulk_deny_data_requests_parameters()

static tool_dataprivacy\external::bulk_deny_data_requests_parameters ( )
static

Parameter description for bulk_deny_data_requests().

Since
Moodle 3.5
Return values
external_function_parameters

◆ bulk_deny_data_requests_returns()

static tool_dataprivacy\external::bulk_deny_data_requests_returns ( )
static

Parameter description for bulk_deny_data_requests().

Since
Moodle 3.5
Return values
core_external\external_description

◆ cancel_data_request()

static tool_dataprivacy\external::cancel_data_request ( $requestid)
static

Cancel a data request.

Since
Moodle 3.5
Parameters
int$requestidThe request ID.
Return values
array
Exceptions
invalid_persistent_exception
coding_exception
invalid_parameter_exception
restricted_context_exception

◆ cancel_data_request_parameters()

static tool_dataprivacy\external::cancel_data_request_parameters ( )
static

Parameter description for cancel_data_request().

Since
Moodle 3.5
Return values
external_function_parameters

◆ cancel_data_request_returns()

static tool_dataprivacy\external::cancel_data_request_returns ( )
static

Parameter description for cancel_data_request().

Since
Moodle 3.5
Return values
core_external\external_description

◆ confirm_contexts_for_deletion()

static tool_dataprivacy\external::confirm_contexts_for_deletion ( $ids)
static

Confirm a given array of expired context record IDs.

Since
Moodle 3.5
Parameters
int[]$idsArray of record IDs from the expired contexts table.
Return values
array
Exceptions
coding_exception
dml_exception
invalid_parameter_exception
restricted_context_exception

◆ confirm_contexts_for_deletion_parameters()

static tool_dataprivacy\external::confirm_contexts_for_deletion_parameters ( )
static

Parameters for confirm_contexts_for_deletion().

Since
Moodle 3.5
Return values
external_function_parameters

◆ confirm_contexts_for_deletion_returns()

static tool_dataprivacy\external::confirm_contexts_for_deletion_returns ( )
static

Returns for confirm_contexts_for_deletion().

Since
Moodle 3.5
Return values
external_single_structure

◆ contact_dpo()

static tool_dataprivacy\external::contact_dpo ( $message)
static

Make a general enquiry to a DPO.

Since
Moodle 3.5
Parameters
string$messageThe message to be sent to the DPO.
Return values
array
Exceptions
coding_exception
invalid_parameter_exception
invalid_persistent_exception
restricted_context_exception
dml_exception
moodle_exception

◆ contact_dpo_parameters()

static tool_dataprivacy\external::contact_dpo_parameters ( )
static

Parameter description for contact_dpo().

Since
Moodle 3.5
Return values
external_function_parameters

◆ contact_dpo_returns()

static tool_dataprivacy\external::contact_dpo_returns ( )
static

Parameter description for contact_dpo().

Since
Moodle 3.5
Return values
core_external\external_description

◆ create_category_form()

static tool_dataprivacy\external::create_category_form ( $jsonformdata)
static

Creates a data category from form data.

Since
Moodle 3.5
Parameters
string$jsonformdata
Return values
array

◆ create_category_form_parameters()

static tool_dataprivacy\external::create_category_form_parameters ( )
static

Parameter description for create_category_form().

Since
Moodle 3.5
Return values
external_function_parameters

◆ create_category_form_returns()

static tool_dataprivacy\external::create_category_form_returns ( )
static

Returns for create_category_form().

Since
Moodle 3.5
Return values
external_single_structure

◆ create_purpose_form()

static tool_dataprivacy\external::create_purpose_form ( $jsonformdata)
static

Creates a data purpose from form data.

Since
Moodle 3.5
Parameters
string$jsonformdata
Return values
array

◆ create_purpose_form_parameters()

static tool_dataprivacy\external::create_purpose_form_parameters ( )
static

Parameter description for create_purpose_form().

Since
Moodle 3.5
Return values
external_function_parameters

◆ create_purpose_form_returns()

static tool_dataprivacy\external::create_purpose_form_returns ( )
static

Returns for create_purpose_form().

Since
Moodle 3.5
Return values
external_single_structure

◆ delete_category()

static tool_dataprivacy\external::delete_category ( $id)
static

Deletes a data category.

Since
Moodle 3.5
Parameters
int$idThe ID.
Return values
array
Exceptions
invalid_persistent_exception
coding_exception
invalid_parameter_exception

◆ delete_category_parameters()

static tool_dataprivacy\external::delete_category_parameters ( )
static

Parameter description for delete_category().

Since
Moodle 3.5
Return values
external_function_parameters

◆ delete_category_returns()

static tool_dataprivacy\external::delete_category_returns ( )
static

Parameter description for delete_category().

Since
Moodle 3.5
Return values
external_single_structure

◆ delete_purpose()

static tool_dataprivacy\external::delete_purpose ( $id)
static

Deletes a data purpose.

Since
Moodle 3.5
Parameters
int$idThe ID.
Return values
array
Exceptions
invalid_persistent_exception
coding_exception
invalid_parameter_exception

◆ delete_purpose_parameters()

static tool_dataprivacy\external::delete_purpose_parameters ( )
static

Parameter description for delete_purpose().

Since
Moodle 3.5
Return values
external_function_parameters

◆ delete_purpose_returns()

static tool_dataprivacy\external::delete_purpose_returns ( )
static

Parameter description for delete_purpose().

Since
Moodle 3.5
Return values
external_single_structure

◆ deny_data_request()

static tool_dataprivacy\external::deny_data_request ( $requestid)
static

Deny a data request.

Since
Moodle 3.5
Parameters
int$requestidThe request ID.
Return values
array
Exceptions
coding_exception
dml_exception
invalid_parameter_exception
restricted_context_exception
moodle_exception

◆ deny_data_request_parameters()

static tool_dataprivacy\external::deny_data_request_parameters ( )
static

Parameter description for deny_data_request().

Since
Moodle 3.5
Return values
external_function_parameters

◆ deny_data_request_returns()

static tool_dataprivacy\external::deny_data_request_returns ( )
static

Parameter description for deny_data_request().

Since
Moodle 3.5
Return values
core_external\external_description

◆ get_activity_options()

static tool_dataprivacy\external::get_activity_options ( $nodefaults)
static

Fetches a list of activity options for setting data registry defaults.

Parameters
boolean$nodefaultsIf false, it will fetch all of the activities. Otherwise, it will only fetch the activities that don't have defaults yet (e.g. when adding a new activity module defaults).
Return values
array

◆ get_activity_options_parameters()

static tool_dataprivacy\external::get_activity_options_parameters ( )
static

Parameters for get_activity_options().

Return values
external_function_parameters

◆ get_activity_options_returns()

static tool_dataprivacy\external::get_activity_options_returns ( )
static

Returns for get_category_options().

Return values
external_single_structure

◆ get_category_options()

static tool_dataprivacy\external::get_category_options ( $includeinherit,
$includenotset )
static

Fetches a list of data category options containing category IDs as keys and the category name for the value.

Parameters
bool$includeinheritWhether to include the "Inherit" option.
bool$includenotsetWhether to include the "Not set" option.
Return values
array

◆ get_category_options_parameters()

static tool_dataprivacy\external::get_category_options_parameters ( )
static

Parameters for get_category_options().

Return values
external_function_parameters

◆ get_category_options_returns()

static tool_dataprivacy\external::get_category_options_returns ( )
static

Returns for get_category_options().

Return values
external_single_structure

◆ get_data_request()

static tool_dataprivacy\external::get_data_request ( $requestid)
static

Fetch the details of a user's data request.

Since
Moodle 3.5
Parameters
int$requestidThe request ID.
Return values
array
Exceptions
coding_exception
dml_exception
invalid_parameter_exception
restricted_context_exception
moodle_exception

◆ get_data_request_parameters()

static tool_dataprivacy\external::get_data_request_parameters ( )
static

Parameter description for get_data_request().

Since
Moodle 3.5
Return values
external_function_parameters

◆ get_data_request_returns()

static tool_dataprivacy\external::get_data_request_returns ( )
static

Parameter description for get_data_request().

Since
Moodle 3.5
Return values
core_external\external_description

◆ get_purpose_options()

static tool_dataprivacy\external::get_purpose_options ( $includeinherit,
$includenotset )
static

Fetches a list of data storage purposes containing purpose IDs as keys and the purpose name for the value.

Parameters
bool$includeinheritWhether to include the "Inherit" option.
bool$includenotsetWhether to include the "Not set" option.
Return values
array

◆ get_purpose_options_parameters()

static tool_dataprivacy\external::get_purpose_options_parameters ( )
static

Parameters for get_purpose_options().

Return values
external_function_parameters

◆ get_purpose_options_returns()

static tool_dataprivacy\external::get_purpose_options_returns ( )
static

Returns for get_purpose_options().

Return values
external_single_structure

◆ get_users()

static tool_dataprivacy\external::get_users ( $query)
static

Fetch the details of a user's data request.

Since
Moodle 3.5
Parameters
string$queryThe search request.
Return values
array
Exceptions
required_capability_exception
dml_exception
invalid_parameter_exception
restricted_context_exception

◆ get_users_parameters()

static tool_dataprivacy\external::get_users_parameters ( )
static

Parameter description for get_data_request().

Since
Moodle 3.5
Return values
external_function_parameters

◆ get_users_returns()

static tool_dataprivacy\external::get_users_returns ( )
static

Parameter description for get_users().

Since
Moodle 3.5
Return values
core_external\external_description
Exceptions
coding_exception

◆ mark_complete()

static tool_dataprivacy\external::mark_complete ( $requestid)
static

Mark a user's general enquiry's status as complete.

Since
Moodle 3.5.2
Parameters
int$requestidThe request ID of the general enquiry.
Return values
array
Exceptions
coding_exception
invalid_parameter_exception
invalid_persistent_exception
restricted_context_exception
dml_exception
moodle_exception

◆ mark_complete_parameters()

static tool_dataprivacy\external::mark_complete_parameters ( )
static

Parameter description for mark_complete().

Since
Moodle 3.5.2
Return values
external_function_parameters

◆ mark_complete_returns()

static tool_dataprivacy\external::mark_complete_returns ( )
static

Parameter description for mark_complete().

Since
Moodle 3.5.2
Return values
core_external\external_description

◆ set_context_defaults()

static tool_dataprivacy\external::set_context_defaults ( $contextlevel,
$category,
$purpose,
$activity,
$override )
static

Updates the default category and purpose for a given context level (and optionally, a plugin).

Parameters
int$contextlevelThe context level.
int$categoryThe ID matching the category.
int$purposeThe ID matching the purpose record.
int$activityThe name of the activity that we're making a defaults configuration for.
bool$overrideWhether to override the purpose/categories of existing instances to these defaults.
Return values
array

◆ set_context_defaults_parameters()

static tool_dataprivacy\external::set_context_defaults_parameters ( )
static

Parameters for set_context_defaults().

Return values
external_function_parameters

◆ set_context_defaults_returns()

static tool_dataprivacy\external::set_context_defaults_returns ( )
static

Returns for set_context_defaults().

Return values
external_single_structure

◆ set_context_form()

static tool_dataprivacy\external::set_context_form ( $jsonformdata)
static

Creates a data category from form data.

Since
Moodle 3.5
Parameters
string$jsonformdata
Return values
array

◆ set_context_form_parameters()

static tool_dataprivacy\external::set_context_form_parameters ( )
static

Parameter description for set_context_form().

Since
Moodle 3.5
Return values
external_function_parameters

◆ set_context_form_returns()

static tool_dataprivacy\external::set_context_form_returns ( )
static

Returns for set_context_form().

Since
Moodle 3.5
Return values
external_single_structure

◆ set_contextlevel_form()

static tool_dataprivacy\external::set_contextlevel_form ( $jsonformdata)
static

Creates a data category from form data.

Since
Moodle 3.5
Parameters
string$jsonformdata
Return values
array

◆ set_contextlevel_form_parameters()

static tool_dataprivacy\external::set_contextlevel_form_parameters ( )
static

Parameter description for set_contextlevel_form().

Since
Moodle 3.5
Return values
external_function_parameters

◆ set_contextlevel_form_returns()

static tool_dataprivacy\external::set_contextlevel_form_returns ( )
static

Returns for set_contextlevel_form().

Since
Moodle 3.5
Return values
external_single_structure

◆ tree_extra_branches()

static tool_dataprivacy\external::tree_extra_branches ( $contextid,
$element )
static

Returns tree extra branches.

Since
Moodle 3.5
Parameters
int$contextid
string$element
Return values
array

◆ tree_extra_branches_parameters()

static tool_dataprivacy\external::tree_extra_branches_parameters ( )
static

Parameter description for tree_extra_branches().

Since
Moodle 3.5
Return values
external_function_parameters

◆ tree_extra_branches_returns()

static tool_dataprivacy\external::tree_extra_branches_returns ( )
static

Returns for tree_extra_branches().

Since
Moodle 3.5
Return values
external_single_structure

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