Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 39 and 400] [Versions 400 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.

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

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

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

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.

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

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.

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

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

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

return: array