Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_dataprivacy

Namespaces

namespace  tool_dataprivacy
  
 
namespace  tool_dataprivacy\event
  
 
namespace  tool_dataprivacy\external
  
 
namespace  tool_dataprivacy\form
  
 
namespace  tool_dataprivacy\local
  
 
namespace  tool_dataprivacy\output
  
 
namespace  tool_dataprivacy\privacy
  
 
namespace  tool_dataprivacy\task
  
 

Classes

class  behat_tool_dataprivacy
 Step definitions to generate database fixtures for the data privacy tool. More...
 
class  data_privacy_testcase
 Parent class for tests which need data privacy functionality. More...
 
class  tool_dataprivacy\api
 Class containing helper methods for processing data requests. More...
 
class  tool_dataprivacy\category
 Class for loading/storing data categories from the DB. More...
 
class  tool_dataprivacy\context_instance
 Class for loading/storing context instances data from the DB. More...
 
class  tool_dataprivacy\contextlevel
 Class for loading/storing context level data from the DB. More...
 
class  tool_dataprivacy\data_registry
 Data registry business logic methods. More...
 
class  tool_dataprivacy\data_request
 Class for loading/storing data requests from the DB. More...
 
class  tool_dataprivacy\event\user_deleted_observer
 Event observers supported by this module. More...
 
class  tool_dataprivacy\expired_context
 Class that represents an expired context. More...
 
class  tool_dataprivacy\expired_contexts_manager
 Expired contexts manager. More...
 
class  tool_dataprivacy\expiry_info
 Expiry Data. More...
 
class  tool_dataprivacy\external
 Class external. More...
 
class  tool_dataprivacy\external\category_exporter
 Class for exporting field data. More...
 
class  tool_dataprivacy\external\context_instance_exporter
 Class for exporting context instance. More...
 
class  tool_dataprivacy\external\data_request_exporter
 Class for exporting user evidence with all competencies. More...
 
class  tool_dataprivacy\external\name_description_exporter
 Class that exports an object containing a name and a description. More...
 
class  tool_dataprivacy\external\purpose_exporter
 Class for exporting field data. More...
 
class  tool_dataprivacy\filtered_userlist
 An implementation of a userlist which can be filtered by role. More...
 
class  tool_dataprivacy\form\category
 Data category form. More...
 
class  tool_dataprivacy\form\contactdpo
 
class  tool_dataprivacy\form\context_instance
 Context instance data form. More...
 
class  tool_dataprivacy\form\contextlevel
 Context level data form. More...
 
class  tool_dataprivacy\form\purpose
 Data purpose form. More...
 
class  tool_dataprivacy\local\helper
 Class containing helper functions for the data privacy tool. More...
 
class  tool_dataprivacy\manager_observer
 A failure observer for the core_privacy\manager. More...
 
class  tool_dataprivacy\metadata_registry
 Class containing helper methods for processing data requests. More...
 
class  tool_dataprivacy\output\categories
 Class containing the categories page renderable. More...
 
class  tool_dataprivacy\output\crud_element
 Abstract renderer for independent renderable elements. More...
 
class  tool_dataprivacy\output\data_deletion_page
 Class containing data for a user's data requests. More...
 
class  tool_dataprivacy\output\data_registry_compliance_page
 Class containing the data registry compliance renderable. More...
 
class  tool_dataprivacy\output\data_registry_page
 Class containing the data registry renderable. More...
 
class  tool_dataprivacy\output\data_requests_page
 Class containing data for a user's data requests. More...
 
class  tool_dataprivacy\output\data_requests_table
 The class for displaying the data requests table. More...
 
class  tool_dataprivacy\output\defaults_page
 Class containing data for the data registry defaults. More...
 
class  tool_dataprivacy\output\expired_contexts_table
 The class for displaying the expired contexts table. More...
 
class  tool_dataprivacy\output\my_data_requests_page
 Class containing data for a user's data requests. More...
 
class  tool_dataprivacy\output\purposes
 Class containing the purposes page renderable. More...
 
class  tool_dataprivacy\output\renderer
 Renderer class for tool_dataprivacy. More...
 
class  tool_dataprivacy\output\request_filter
 Class containing the filter options data for rendering the autocomplete element for the data requests page. More...
 
class  tool_dataprivacy\output\summary_page
 Class containing the summary page renderable. More...
 
class  tool_dataprivacy\page_helper
 Page helper. More...
 
class  tool_dataprivacy\privacy\provider
 Privacy class for requesting user data. More...
 
class  tool_dataprivacy\purpose
 Class for loading/storing data purposes from the DB. More...
 
class  tool_dataprivacy\purpose_override
 Class for loading/storing data purpose overrides from the DB. More...
 
class  tool_dataprivacy\task\delete_existing_deleted_users
 Scheduled task to create delete data request for pre-existing deleted users. More...
 
class  tool_dataprivacy\task\delete_expired_contexts
 Scheduled task to delete expired context instances once they are approved for deletion. More...
 
class  tool_dataprivacy\task\delete_expired_requests
 Scheduled task to delete files and update request statuses once they expire. More...
 
class  tool_dataprivacy\task\expired_retention_period
 Scheduled task to flag contexts as expired. More...
 
class  tool_dataprivacy_data_request_form
 The contact form to the site's Data Protection Officer. More...
 
class  tool_dataprivacy_generator
 Data privacy tool data generator class. More...
 

Functions

 tool_dataprivacy_myprofile_navigation (tree $tree, $user, $iscurrentuser, $course)
 Add nodes to myprofile page.
 
 tool_dataprivacy_output_fragment_addcategory_form ($args)
 Fragment to add a new category.
 
 tool_dataprivacy_output_fragment_addpurpose_form ($args)
 Fragment to add a new purpose.
 
 tool_dataprivacy_output_fragment_context_form ($args)
 Fragment to edit a context purpose and category.
 
 tool_dataprivacy_output_fragment_contextlevel_form ($args)
 Fragment to edit a contextlevel purpose and category.
 
 tool_dataprivacy_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array())
 Serves any files associated with the data privacy settings.
 
 tool_dataprivacy_standard_footer_html ()
 Callback to add footer elements.
 
 xmldb_tool_dataprivacy_upgrade ($oldversion)
 Function to upgrade tool_dataprivacy.
 

Variables

 $capabilities
 
 $definitions
 
 $functions
 
 $messageproviders
 
 $observers
 
 $plugin = 2023041800
 
 $tasks
 
$plugin component = 'tool_dataprivacy'
 
$plugin version = 2023042400
 

Detailed Description

Function Documentation

◆ tool_dataprivacy_myprofile_navigation()

tool_dataprivacy_myprofile_navigation ( tree $tree,
$user,
$iscurrentuser,
$course )

Add nodes to myprofile page.

Parameters
tree$treeTree object
stdClass$userUser object
bool$iscurrentuser
stdClass$courseCourse object
Return values
bool
Exceptions
coding_exception
dml_exception
moodle_exception

◆ tool_dataprivacy_output_fragment_addcategory_form()

tool_dataprivacy_output_fragment_addcategory_form ( $args)

Fragment to add a new category.

Parameters
array$argsThe fragment arguments.
Return values
stringThe rendered mform fragment.

◆ tool_dataprivacy_output_fragment_addpurpose_form()

tool_dataprivacy_output_fragment_addpurpose_form ( $args)

Fragment to add a new purpose.

Parameters
array$argsThe fragment arguments.
Return values
stringThe rendered mform fragment.

◆ tool_dataprivacy_output_fragment_context_form()

tool_dataprivacy_output_fragment_context_form ( $args)

Fragment to edit a context purpose and category.

Parameters
array$argsThe fragment arguments.
Return values
stringThe rendered mform fragment.

◆ tool_dataprivacy_output_fragment_contextlevel_form()

tool_dataprivacy_output_fragment_contextlevel_form ( $args)

Fragment to edit a contextlevel purpose and category.

Parameters
array$argsThe fragment arguments.
Return values
stringThe rendered mform fragment.

◆ tool_dataprivacy_pluginfile()

tool_dataprivacy_pluginfile ( $course,
$cm,
$context,
$filearea,
$args,
$forcedownload,
array $options = array() )

Serves any files associated with the data privacy settings.

Parameters
stdClass$courseCourse object
stdClass$cmCourse module object
context$contextContext
string$fileareaFile area for data privacy
array$argsArguments
bool$forcedownloadIf we are forcing the download
array$optionsMore options
Return values
boolReturns false if we don't find a file.

◆ tool_dataprivacy_standard_footer_html()

tool_dataprivacy_standard_footer_html ( )

Callback to add footer elements.

Return values
stringHTML footer content

◆ xmldb_tool_dataprivacy_upgrade()

xmldb_tool_dataprivacy_upgrade ( $oldversion)

Function to upgrade tool_dataprivacy.

Parameters
int$oldversionthe version we are upgrading from
Return values
boolresult

Variable Documentation

◆ $definitions

$definitions
Initial value:
= array(
'purpose' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 30,
),
'purpose_overrides' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => false,
'staticacceleration' => true,
'staticaccelerationsize' => 50,
),
'contextlevel' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 10,
),
)

◆ $messageproviders

$messageproviders
Initial value:
= [
'contactdataprotectionofficer' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'tool/dataprivacy:managedatarequests'
],
'datarequestprocessingresults' => [
'defaults' => [
'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
]
],
'notifyexceptions' => [
'defaults' => [
'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
],
'capability' => 'tool/dataprivacy:managedatarequests'
],
]

◆ $observers

$observers
Initial value:
= [
[
'eventname' => '\core\event\user_deleted',
'callback' => '\tool_dataprivacy\event\user_deleted_observer::create_delete_data_request',
],
]