'Load a CourseDescriptor, create or update a CourseOverview from it, cache the
overview, and return it.
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 load_from_module_store(cls, course_id):

    store = modulestore()
    with store.bulk_operations(course_id):
        course = store.get_course(course_id)
        if isinstance(course, CourseDescriptor):
            course_overview = cls._create_or_update(course)
            try:
                with transaction.atomic():
                    course_overview.save()
                    CourseOverviewTab.objects.filter(course_overview=course_overview).delete()
                    CourseOverviewTab.objects.bulk_create([CourseOverviewTab(tab_id=tab.tab_id, course_overview=course_overview) for tab in course.tabs])
                    CourseOverviewImageSet.objects.filter(course_overview=course_overview).delete()
                    CourseOverviewImageSet.create(course_overview, course)
            except IntegrityError:
                pass
            except Exception:
                log.exception('CourseOverview    for    course    %s    failed!', course_id)
                raise
            return course_overview
        elif (course is not None):
            raise IOError('Error    while    loading    course    {}    from    the    module    store:    {}', unicode(course_id), (course.error_msg if isinstance(course, ErrorDescriptor) else unicode(course)))
        else:
            raise cls.DoesNotExist()
