LLMS_Student::get_last_completed_lesson( int $course_id )
Get the students last completed lesson in a course
Parameters Parameters
- $course_id
-
(int) (Required) WP_Post ID of the course
Return Return
(int) WP_Post ID of the lesson or false if no progress has been made
Source Source
File: includes/models/model.llms.student.php
array_push( $progresses, $this->get_progress( $course_id, 'course' ) ); } $count = count( $progresses ); if ( $count ) { $progress = round( array_sum( $progresses ) / $count, 2 ); } else { $progress = 0; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |