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::update_completion_status( string $status, int $object_id, string $object_type, string $trigger = 'unspecified' )

Update the completion status of a track, course, section, or lesson for the current student


Description Description

Cascades up to parents and clears progress caches for parents.

Triggers actions for completion/incompletion.

Inserts / updates necessary user postmeta data.


Parameters Parameters

$status

(Required) New status to update to, either "complete" or "incomplete".

$object_id

(Required) WP_Post ID of the object.

$object_type

(Required) The type of object. A lesson, section, course, or course_track.

$trigger

(Optional) String describing the reason for the status change.

Default value: 'unspecified'


Top ↑

Return Return

(boolean)


Top ↑

Source Source

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


			

Top ↑

Changelog Changelog

Changelog
Version Description
4.2.0 Use filterable functions to determine if the object is completable. Added filter to allow customization of object parent data.
3.17.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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