def user_can_skip_entrance_exam(user, course):
 if (not course_has_entrance_exam(course)):
  return True
 if (not user.is_authenticated()):
  return False
 if has_access(user, 'staff', course):
  return True
 if EntranceExamConfiguration.user_can_skip_entrance_exam(user, course.id):
  return True
 if (not get_entrance_exam_content(user, course)):
  return True
 return False

def user_can_skip_entrance_exam ( user , course ) : if ( not course_has_entrance_exam ( course ) ) : return True if ( not user . is_authenticated ( ) ) : return False if has_access ( user , 'staff' , course ) : return True if EntranceExamConfiguration . user_can_skip_entrance_exam ( user , course . id ) : return True if ( not get_entrance_exam_content ( user , course ) ) : return True return False
checks all of the various override conditions for a user to skip an entrance exam begin by short-circuiting if the course does not have an entrance exam .