Get all quizzes in a course

function learndash_get_course_quizzes( $course_id = 0 ) {
	if ( !empty( $course_id ) ) {
		$query_args = array( 
			'post_type' 		=> 	'sfwd-quiz', 
			'posts_per_page' 	=> 	-1,
			'orderby'			=>	'title',
			'order'				=>	'ASC',
			'meta_key'     		=> 'course_id',
			'meta_value'   		=> $course_id,
			'meta_compare' 		=> '=',
			// This tells WP_Query to return only the post IDs. Comment 
			// out if you want full Post object
			'fields'			=>	'ids'
		);

		$query_results = new WP_Query( $query_args );

		if ( !empty( $query_results->posts ) ) {
			return $query_results->posts;
		}
	}
}