Author: Tim Hunt
MDL-20636 Fix some minor editing problems, and a bunch of coding style.
http://git.moodle.org/gw?p=moodle.git;a=commit;h=fdd015b779104da3575ddb604b4b16972c258abb
http://github.com/moodle/moodle/commit/fdd015b779104da3575ddb604b4b16972c258abb