def user_must_complete_entrance_exam(request, user, course):
 if user_can_skip_entrance_exam(user, course):
  return False
 if user_has_passed_entrance_exam(request, course):
  return False
 return True

def user_must_complete_entrance_exam ( request , user , course ) : if user_can_skip_entrance_exam ( user , course ) : return False if user_has_passed_entrance_exam ( request , course ) : return False return True
some courses can be gated on an entrance exam .