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 a lesson_id property set But also that the lesson with id lesson_id has a quiz property as equal as this quiz id.

Default value: false


Top ↑

Return Return

(bool)


Top ↑

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 ) {


Top ↑

Changelog Changelog

Changelog
Version Description
4.2.0 Added the $deep parameter.
3.16.12 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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