CONTRIB-4878: url escape mailto links

https://tracker.moodle.org/browse/CONTRIB-4878

The teacher view page fails to url escape spaces in the mailto link. This prevents teachers with Apple Mail from using the mailto links.