<?php

if (is_admin() && function_exists('acf_maybe_get_POST')) {
	$course_id =  intval(acf_maybe_get_POST('post_id'));
} else {
	global $post;
	$course_id =  $post->ID;
}

if (isset($course_id) && get_post_type($course_id) === 'tribe_events') {
	$content_blocks = get_field('content_block', $course_id);
	foreach ($content_blocks as $content_block_id) {
		echo get_the_content(null, false, $content_block_id);
	}
}