LLMS_Student::mark_complete( int $object_id, string $object_type, string $trigger = 'unspecified' )
Mark a lesson, section, course, or track complete for the given user.
Description Description
See also See also
- llms_mark_complete(): calls this function without having to instantiate the LLMS_Student class first
Parameters Parameters
- $object_id
-
(int) (Required) WP Post ID of the lesson, section, course, or track
- $object_type
-
(string) (Required) object type [lesson|section|course|track]
- $trigger
-
(string) (Optional) String describing the reason for marking complete
Default value: 'unspecified'
Return Return
(bool)
Source Source
File: includes/models/model.llms.student.php
public function mark_complete( $object_id, $object_type, $trigger = 'unspecified' ) {
// Short circuit if it's already completed.
if ( $this->is_complete( $object_id, $object_type ) ) {
return true;
}
return $this->update_completion_status( 'complete', $object_id, $object_type, $trigger );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.3.1 | Introduced. |