tidy up mainteacher stuff - fix for 212 errors that occur when the mainteacher set has not been added to the course.