'Copy all the course assets from source_course_key to dest_course_key.
Arguments:
source_course_key (CourseKey): identifier of course to copy from
dest_course_key (CourseKey): identifier of course to copy to
user_id (int|long): user copying the asset metadata'

@contract(source_course_key='CourseKey', dest_course_key='CourseKey', user_id='int|long')
def copy_all_asset_metadata(self, source_course_key, dest_course_key, user_id):

    source_store = self._get_modulestore_for_courselike(source_course_key)
    dest_store = self._get_modulestore_for_courselike(dest_course_key)
    if (source_store != dest_store):
        with self.bulk_operations(dest_course_key):
            all_assets = source_store.get_all_asset_metadata(source_course_key, 'asset')
            for asset in all_assets:
                new_asset_key = dest_course_key.make_asset_key('asset', asset.asset_id.path)
                copied_asset = AssetMetadata(new_asset_key)
                copied_asset.from_storable(asset.to_storable())
                dest_store.save_asset_metadata(copied_asset, user_id)
    else:
        source_store.copy_all_asset_metadata(source_course_key, dest_course_key, user_id)
