LLMS_Lesson
LLMS_Lesson model class
Description Description
Source Source
File: includes/models/model.llms.lesson.php
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Improve the query used to retrieve the previous/next so that we don't miss sibling lessons within the same section if the previous/next one(s) status is (are) not published. Make sure to always return false if no previous lesson is found. Use strict comparisons where needed. |
4.0.0 | Remove deprecated methods. |
3.36.2 | When getting the lesson's available date: add available number of days to the course start date only if there's a course start date. |
3.29.0 | Unknown. |
1.0.0 | Introduced. |
Methods Methods
- get_audio — Attempt to get oEmbed for an audio provider
- get_available_date — Get the date a course became or will become available according to element drip settings
- get_course — Retrieve an instance of LLMS_Course for the element's parent course
- get_creation_args — An array of default arguments to pass to $this->create() when creating a new post
- get_next_lesson — Get next lesson ID
- get_order — Retrieves the lesson's order within its parent section
- get_parent_course — Get parent course id
- get_parent_section — Get parent section id
- get_prerequisite — Get the lesson prerequisite
- get_preview_classes — Get CSS classes to display on the course syllabus .llms-lesson-preview element
- get_preview_icon_html — Get HTML of the icon to display in the .llms-lesson-preview element on the syllabus
- get_previous_lesson — Get previous lesson ID
- get_quiz — Retrieve an object for the assigned quiz (if a quiz is assigned)
- get_section — Retrieve an instance of LLMS_Course for the elements's parent section
- get_sibling — Retrieve the sibling lesson in a specified direction
- get_sibling_lesson_query — Performs a query to retrieve a sibling lesson in the specified direction
- get_sibling_section_query — Performs a query to retrieve sibling lessons from the lesson's adjacent section
- get_video — Attempt to get oEmbed for a video provider
- has_content — Get whether the lesson has a content set
- has_modified_slug — Determine if the slug (post name) of a lesson has been modified
- has_prerequisite — Determine if lesson prereq is enabled and a prereq lesson is selected
- has_quiz — Determine if a quiz is assigned to this lesson
- is_available — Determine if an element is available based on drip settings
- is_complete — Determine if the lesson has been completed by a specific user
- is_free — Determine if a the lesson is marked as "free"
- is_orphan — Determine if the lesson is an orphan
- is_quiz_enabled — Determines if a quiz is enabled for the lesson
- set_excerpt — Set lesson's excerpt
- set_order — Set order
- set_parent_course — Set parent course
- set_parent_section — Set parent section
- set_title — Set lesson title
- toArrayAfter — Add data to the course model when converted to array
- update — Update object data