Tested for Moodle 2.7

Small corrections were made