For Moodle Servers, don’t think GDPR applies to K12 entities nor Colleges and Universities, but it sure does with Training Depts in Corps.
Moodle has always lacked robust reporting – core or addon/plugin. Besides, that if there is a commercial addon/plugin, do you really need it? Maybe.
But for things like GDPR ‘discovery’, there is a very affordable way to determine if one should be concerned … via command line … a poor man’s report .. if reader wills.
In moodlecode/admin/cli/ create a exeutable bash shell script that is really
a query of the Moodle DB that outputs to a text file.
Name: euusers
Contents: (you change DB user and Pass as well as DB name and it’s all on one line.
mysql -u [DBUSER] -p'[DBPASS]’ -e “use [DBNAME];select id,firstname,lastname,email,country from mdl_user WHERE country RLIKE ‘GB|FR|IT|BE|BG|CZ|DK|DE|EE|IE|EL|ES|HR|CY|LV|LT|LU|MT|NL|AT|PL|PT|RO|HU|UK’;” > euusers.txt; cat euusers.txt|more; wc -l euusers.txt;ls -l *.txt
To execute the script as root, either use:
source euusers
or if you could make the ‘euusers’ script executable:
chmod u+x euusers
Then you could use ./euusers to execute.
What the script does …
* searches mdl_user table for users who have an EU nation in their profile.
* exports those to a euusers.txt file
* shows you the euusers.txt files and does a ‘word count’ on that file so that
you have the number of users.
Output looks like:
id firstname lastname email country
3104 bob jones bob.jones@somenet.com HU
3235 mary jones mjones@somenet.com FR
to make this available to System Admins of the Moodle, one could
direct the export of the file to a file system repo in moodledata/repository/serverinfo
And in courses reserved for System Admins, setup the use of that file system repo so that those courses can link to the .txt files contained therein.
So we have moodledata/repository/serverinfo/
We change the redirect line in the script above to:
> /full/path/to/moodledata/respository/serverinfo/
Now one can link to that text file report in the Moodle interface.