def get_course_overview_with_access(user, action, course_key, check_if_enrolled=False):
 try:
  course_overview = CourseOverview.get_from_id(course_key)
 except CourseOverview.DoesNotExist:
  raise Http404('Course not found.')
 check_course_access(course_overview, user, action, check_if_enrolled)
 return course_overview

def get_course_overview_with_access ( user , action , course_key , check_if_enrolled = False ) : try : course_overview = CourseOverview . get_from_id ( course_key ) except CourseOverview . DoesNotExist : raise Http404 ( 'Course not found.' ) check_course_access ( course_overview , user , action , check_if_enrolled ) return course_overview
given a course_key .