LLMS_Quiz::is_orphan( bool $deep = false )
Determine if the quiz is an orphan.
Parameters Parameters
- $deep
-
(bool) (Optional) Whether or not deeply check this quiz is orphan. Default
false. When set to true will ensure not only that this quiz as alesson_idproperty set But also that the lesson with idlesson_idhas aquizproperty as equal as this quiz id.Default value: false
Return Return
(bool)
Source Source
File: includes/models/model.llms.quiz.php
* @since 3.16.0
*
* @return bool
*/
public function has_time_limit() {
return ( 'yes' === $this->get( 'limit_time' ) );
}
/**
* Determine if the quiz is an orphan.
*
* @since 3.16.12
* @since 4.2.0 Added the $deep parameter.
*
* @param bool $deep Optional. Whether or not deeply check this quiz is orphan. Default `false`.
* When set to true will ensure not only that this quiz as a `lesson_id` property set
* But also that the lesson with id `lesson_id` has a `quiz` property as equal as this quiz id.
* @return bool
*/
public function is_orphan( $deep = false ) {
$parent_id = $this->get( 'lesson_id' );
if ( ! $parent_id ) {
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.2.0 | Added the $deep parameter. |
| 3.16.12 | Introduced. |