Testing methods in MoodelRestCourse and updating where appropriate. Added extra code to append error message when Moodle error thrown.