Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

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