Moodle: Prevent students showing their private email addresses

A moodle user profile setting allows students to choose to reveal their email address.  In many schools, it may be desirable to remove this option.
The effect of the following hack merely removes these options from the drop down choices in the moodle user profile.

moodle/ user/ editlib.php
Comment out lines 88-89

 //   $choices['1'] = get_string('emaildisplayyes');
 //   $choices['2'] = get_string('emaildisplaycourse');

No comments:

This post contains some responses to questions that I have been asked by various people over the last few years. In most cases, I have also posted the information on relevant online community forums such as I hope that you find this useful. Stephen Digby