LLMS_Lesson::is_complete( int $user_id = null )
Determine if the lesson has been completed by a specific user
Description Description
Parameters Parameters
- $user_id
-
(int) (Optional) WP_User ID of a student
Default value: null
Return Return
(bool)
Source Source
File: includes/models/model.llms.lesson.php
public function is_complete( $user_id = null ) { $user_id = $user_id ? $user_id : get_current_user_id(); // incomplete b/c no user if ( ! $user_id ) { return false; } $student = new LLMS_Student( $user_id ); return $student->is_complete( $this->get( 'id' ), 'lesson' ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: