Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 39 and 401] [Versions 401 and 403]

Collection of helper functions for the data privacy tool.

Copyright: 2018 Jun Pataleta
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 251 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: helper  - X-Ref

Class containing helper functions for the data privacy tool.

get_request_type_string($requesttype)   X-Ref
Retrieves the human-readable text value of a data request type.

param: int $requesttype The request type.
return: string

get_shortened_request_type_string($requesttype)   X-Ref
Retrieves the human-readable shortened text value of a data request type.

param: int $requesttype The request type.
return: string

get_request_types()   X-Ref
Returns the key value-pairs of request type code and their string value.

return: array

get_request_types_short()   X-Ref
Returns the key value-pairs of request type code and their shortened string value.

return: array

get_request_status_string($status)   X-Ref
Retrieves the human-readable value of a data request status.

param: int $status The request status.
return: string

get_request_statuses()   X-Ref
Returns the key value-pairs of request status code and string value.

return: array

get_request_creation_method_string($creation)   X-Ref
Retrieves the human-readable value of a data request creation method.

param: int $creation The request creation method.
return: string

get_request_creation_methods()   X-Ref
Returns the key value-pairs of request creation method code and string value.

return: array

get_children_of_user($userid)   X-Ref
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.
param: int $userid The user's ID.
return: array

get_request_filter_options()   X-Ref
Get options for the data requests filter.

return: array