Warning: This method has been deprecated. Method LLMS_Quiz::get_lessons() is deprecated with no replacement instead.

LLMS_Quiz::get_lessons( string $return = 'ids' )

Retrieve lessons this quiz is assigned to.


Parameters Parameters

$return

(string) (Optional) Format of the return [ids|lessons]. Default 'ids'.

Default value: 'ids'


Top ↑

Return Return

(array) Array of WP_Post IDs (lesson post types).


Top ↑

Source Source

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

		 * @param boolean            $quiz_open Whether the quiz is open.
		 * @param int|null           $user_id   WP User ID, can be `null`.
		 * @param int                $quiz_id   The Quiz id.
		 * @param LLMS_Quiz          $quiz      The LLMS_Quiz instance.
		 * @param LLMS_Student|false $student   LLMS_Student instance or false if user not found.
		 */
		return apply_filters( 'llms_quiz_is_open', $quiz_open, $user_id, $this->get( 'id' ), $this, $student );
	}

	/**
	 * Retrieve an instance of the question manager for the quiz.
	 *
	 * @since 3.16.0
	 *
	 * @return LLMS_Question_Manager
	 */
	public function questions() {
		return new LLMS_Question_Manager( $this );
	}

	/**
	 * Called before data is sorted and returned by $this->toArray().
	 * Extending classes should override this data if custom data should
	 * be added when object is converted to an array or json.
	 *
	 * @since 3.3.0
	 * @since 3.19.2 Unknown.
	 * @since 3.38.0 Only add theme metadata to the quiz array when the `llms_get_quiz_theme_settings` filter is being used.
	 *

Top ↑

Changelog Changelog

Changelog
Version Description
4.14.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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