catalyst / moodle-local_datacleaner

Reduce, filter, and anonymize moodle data for non-prod environments
https://moodle.org/plugins/local_datacleaner
19 stars 16 forks source link

Scramble user data not working as expected #157

Closed jwalits closed 1 year ago

jwalits commented 1 year ago

The keepusernames setting from the Scramble user data page is not being respected.

Culprit: https://github.com/catalyst/moodle-local_datacleaner/blob/master/cleaner/users/classes/clean.php#L64

The function get_user_criteria(); - https://github.com/catalyst/moodle-local_datacleaner/blob/master/classes/clean.php#L182 - expects the module config to be passed in, instead it is passing the list of cli options get_user_criteria(static::$options); thus never actually keeping the usernames as they are

I'll work on a patch to fix it