Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Student::insert_completion_postmeta( int $object_id, string $trigger = 'unspecified' )
Add student postmeta data for completion of a lesson, section, course or track
Parameters Parameters
- $object_id
-
(int) (Required) WP Post ID of the lesson, section, course or track
- $trigger
-
(string) (Optional) String describing the reason for mark completion
Default value: 'unspecified'
Return Return
(boolean)
Source Source
File: includes/models/model.llms.student.php
private function insert_completion_postmeta( $object_id, $trigger = 'unspecified' ) { // Add info to the user postmeta table. $user_metadatas = array( '_is_complete' => 'yes', '_completion_trigger' => $trigger, ); $update = llms_bulk_update_user_postmeta( $this->get_id(), $object_id, $user_metadatas, false ); // Returns an array with errored keys or true on success. return is_array( $update ) ? false : true; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.3.1 | Introduced. |