LLMS_Section::get_percent_complete( string $user_id = '', bool $use_cache = true )

Retrieve section completion percentage


Description Description

See also See also


Top ↑

Parameters Parameters

$user_id

(string) (Optional) WP_User ID, if none supplied uses current user (if exists). Default is empty string.

Default value: ''

$use_cache

(bool) (Optional) When true, uses results from from the wp object cache (if available). Default is false.

Default value: true


Top ↑

Return Return

(float)


Top ↑

Source Source

File: includes/models/model.llms.section.php

	public function get_percent_complete( $user_id = '', $use_cache = true ) {

		$student = llms_get_student( $user_id );
		if ( ! $student ) {
			/** This filter is documented in includes/models/model.llms.student.php */
			return apply_filters( 'llms_student_get_progress', 0, $this->get( 'id' ), 'section', $user_id );
		}
		return $student->get_progress( $this->get( 'id' ), 'section', $use_cache );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.