added more checks to make sure user is the teacher/course co-ordinator