Warning: This function has been deprecated. Use ‘learndash_is_quiz_accessable’ instead.
is_quiz_accessable( int|null $user_id = null, WP_Post|null $post = null, boolean $return_incomplete = false, int $course_id )
Checks if the quiz is accessible to the user.
Description Description
Parameters Parameters
- $user_id
-
(Optional) $user_id Optional. The ID of User to check. Defaults to the current logged-in user.
Default value: null
- $post
-
(Optional) The
WP_Post
quiz object.Default value: null
- $return_incomplete
-
(Optional) Whether to return last incomplete step.
Default value: false
- $course_id
-
(Optional) Course ID. Default 0.
Return Return
(int|WP_Post|void) Returns 1 if the quiz is accessible by user otherwise 0. If the $return_incomplete
parameter is set to true it may return WP_Post
object for incomplete step.
Source Source
File: includes/deprecated/3.4.0/functions.php
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Use 'learndash_is_quiz_accessable' instead. |
2.1.0 | Introduced. |