Course::completed_content_ids( $user = null )


Source

File: classes/Course.php

	public function completed_content_ids( $user = null ) {
		$user = dozent_user_data( $user );

		$course_complete_data = $user->get_completed_courses( $this->id );

		$completed_content_ids = [];
		if ( dozent_count( $course_complete_data ) ) {

			$content_ids = (array) dozent_array_get( 'content_ids', $course_complete_data );

			if ( dozent_count( $content_ids ) ) {
				$completed_content_ids = (array) array_filter( dozent_array_get( 'content_ids',
					$course_complete_data ) );
			}
		}


		return $completed_content_ids;
	}