Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

(no description)

Copyright: 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 216 lines (7 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class


Class: backup_anonymizer_helper  - X-Ref

Helper class for anonymization of data

This functions includes a collection of methods that are invoked
from the backup process when anonymization services have been
requested.

The name of each method must be "process_parentname_name", as defined
byt the @anonymizer_final_element final element class, where
parentname is the name ob the parent tag and name the name of the tag
contents to be anonymized (i.e. process_user_username) with one param
being the value to anonymize.

Note: current implementation of anonymization is pretty simple, just some
sequential values are used. If we want more elaborated generation, it
can be replaced later (using generators or wathever). Don't forget we must
ensure some fields (username, idnumber, email) are unique always.

TODO: Improve to use more advanced anonymization

TODO: Finish phpdocs
is_anonymous_user($user)   X-Ref
Determine if the given user is an 'anonymous' user, based on their username, firstname, lastname
and email address.

param: stdClass $user the user record to test
return: bool true if this is an 'anonymous' user

process_user_auth($value)   X-Ref
No description

process_user_username($value)   X-Ref
No description

process_user_idnumber($value)   X-Ref
No description

process_user_firstname($value)   X-Ref
No description

process_user_lastname($value)   X-Ref
No description

process_user_email($value)   X-Ref
No description

process_user_icq($value)   X-Ref
No description

process_user_skype($value)   X-Ref
No description

process_user_yahoo($value)   X-Ref
No description

process_user_aim($value)   X-Ref
No description

process_user_msn($value)   X-Ref
No description

process_user_phone1($value)   X-Ref
No description

process_user_phone2($value)   X-Ref
No description

process_user_institution($value)   X-Ref
No description

process_user_department($value)   X-Ref
No description

process_user_address($value)   X-Ref
No description

process_user_city($value)   X-Ref
No description

process_user_country($value)   X-Ref
No description

process_user_lastip($value)   X-Ref
No description

process_user_picture($value)   X-Ref
No description

process_user_url($value)   X-Ref
No description

process_user_description($value)   X-Ref
No description

process_user_descriptionformat($value)   X-Ref
No description

process_user_imagealt($value)   X-Ref
No description

process_user_firstnamephonetic($value)   X-Ref
Anonymises user's phonetic name field

param: string $value value of the user field
return: string anonymised phonetic name

process_user_lastnamephonetic($value)   X-Ref
Anonymises user's phonetic last name field

param: string $value value of the user field
return: string anonymised last phonetic name

process_user_middlename($value)   X-Ref
Anonymises user's middle name field

param: string $value value of the user field
return: string anonymised middle name

process_user_alternatename($value)   X-Ref
Anonymises user's alternate name field

param: string $value value of the user field
return: string anonymised alternate name