Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_dataprivacy\local\helper Class Reference

Class containing helper functions for the data privacy tool. More...

Static Public Member Functions

static get_children_of_user ($userid)
 Get the users that a user can make data request for.
 
static get_request_creation_method_string ($creation)
 Retrieves the human-readable value of a data request creation method.
 
static get_request_creation_methods ()
 Returns the key value-pairs of request creation method code and string value.
 
static get_request_filter_options ()
 Get options for the data requests filter.
 
static get_request_status_string ($status)
 Retrieves the human-readable value of a data request status.
 
static get_request_statuses ()
 Returns the key value-pairs of request status code and string value.
 
static get_request_type_string ($requesttype)
 Retrieves the human-readable text value of a data request type.
 
static get_request_types ()
 Returns the key value-pairs of request type code and their string value.
 
static get_request_types_short ()
 Returns the key value-pairs of request type code and their shortened string value.
 
static get_shortened_request_type_string ($requesttype)
 Retrieves the human-readable shortened text value of a data request type.
 

Public Attributes

const DEFAULT_PAGE_SIZE = 20
 The default number of results to be shown per page.
 
const FILTER_CREATION = 3
 Filter constant associated with the request creation filter.
 
const FILTER_STATUS = 2
 Filter constant associated with the request status filter.
 
const FILTER_TYPE = 1
 Filter constant associated with the request type filter.
 
const PREF_REQUEST_FILTERS = 'tool_dataprivacy_request-filters'
 The request filters preference key.
 
const PREF_REQUEST_PERPAGE = 'tool_dataprivacy_request-perpage'
 The number of data request records per page preference key.
 

Detailed Description

Class containing helper functions for the data privacy tool.

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

Member Function Documentation

◆ get_children_of_user()

static tool_dataprivacy\local\helper::get_children_of_user ( $userid)
static

Get the users that a user can make data request for.

E.g. User having a parent role and has the 'tool/dataprivacy:makedatarequestsforchildren' capability.

Parameters
int$useridThe user's ID.
Return values
array

◆ get_request_creation_method_string()

static tool_dataprivacy\local\helper::get_request_creation_method_string ( $creation)
static

Retrieves the human-readable value of a data request creation method.

Parameters
int$creationThe request creation method.
Return values
string
Exceptions
moodle_exception

◆ get_request_creation_methods()

static tool_dataprivacy\local\helper::get_request_creation_methods ( )
static

Returns the key value-pairs of request creation method code and string value.

Return values
array

◆ get_request_filter_options()

static tool_dataprivacy\local\helper::get_request_filter_options ( )
static

Get options for the data requests filter.

Return values
array
Exceptions
coding_exception

◆ get_request_status_string()

static tool_dataprivacy\local\helper::get_request_status_string ( $status)
static

Retrieves the human-readable value of a data request status.

Parameters
int$statusThe request status.
Return values
string
Exceptions
moodle_exception

◆ get_request_statuses()

static tool_dataprivacy\local\helper::get_request_statuses ( )
static

Returns the key value-pairs of request status code and string value.

Return values
array

◆ get_request_type_string()

static tool_dataprivacy\local\helper::get_request_type_string ( $requesttype)
static

Retrieves the human-readable text value of a data request type.

Parameters
int$requesttypeThe request type.
Return values
string
Exceptions
coding_exception
moodle_exception

◆ get_request_types()

static tool_dataprivacy\local\helper::get_request_types ( )
static

Returns the key value-pairs of request type code and their string value.

Return values
array

◆ get_request_types_short()

static tool_dataprivacy\local\helper::get_request_types_short ( )
static

Returns the key value-pairs of request type code and their shortened string value.

Return values
array

◆ get_shortened_request_type_string()

static tool_dataprivacy\local\helper::get_shortened_request_type_string ( $requesttype)
static

Retrieves the human-readable shortened text value of a data request type.

Parameters
int$requesttypeThe request type.
Return values
string
Exceptions
coding_exception
moodle_exception

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