'Load a CourseOverview object for a given course ID.
First, we try to load the CourseOverview from the database. If it
doesn\'t exist, we load the entire course from the modulestore, create a
CourseOverview object from it, and then cache it in the database for
future use.
Arguments:
course_id (CourseKey): the ID of the course overview to be loaded.
Returns:
CourseOverview: overview of the requested course.
Raises:
- CourseOverview.DoesNotExist if the course specified by course_id
was not found.
- IOError if some other error occurs while trying to load the
course from the module store.'

@classmethod
def get_from_id(cls, course_id):

    try:
        course_overview = cls.objects.select_related('image_set').get(id=course_id)
        if (course_overview.version < cls.VERSION):
            course_overview.delete()
            course_overview = None
    except cls.DoesNotExist:
        course_overview = None
    if (course_overview and (not hasattr(course_overview, 'image_set'))):
        CourseOverviewImageSet.create(course_overview)
    return (course_overview or cls.load_from_module_store(course_id))
