learndash_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/course/ld-course-progress.php
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |