LD_MARKCOURSEDONE::mark_topics_done( $user_id,  $lesson_id,  $course_id )


Parameters Parameters

$user_id

(Required)

$lesson_id

(Required)

$course_id

(Required)


Source Source

File: src/integrations/learndash/actions/ld-markcoursedone.php

	public function mark_topics_done( $user_id, $lesson_id, $course_id ) {
		$topic_list = learndash_get_topic_list( $lesson_id, $course_id );
		if ( $topic_list ) {
			foreach ( $topic_list as $topic ) {
				learndash_process_mark_complete( $user_id, $topic->ID, false, $course_id );
				$topic_quiz_list = learndash_get_lesson_quiz_list( $topic->ID, $user_id, $course_id );
				if ( $topic_quiz_list ) {
					foreach ( $topic_quiz_list as $ql ) {
						$this->quiz_list[ $ql['post']->ID ] = 0;
					}
				}
			}
		}
	}