Added checks for enrollment module: First, if course is not present and second, if the student has already registered in that course.