Locked content – admin/instructor
-
Course Content Access set ON, but course content still locked for privigiled user (administrator/instructor).
example in: templates/single/course-topics.php -possible in other files.
global $is_enrolled;$is_privileged_user = tutor_utils()->has_user_course_content_access();
…
$is_preview = get_post_meta( $post->ID, ‘_is_preview’, true );
…
$is_public_course = \TUTOR\Course_List::is_public( $course_id );
$is_locked = ! ( $is_enrolled || $is_preview || $is_public_course );
is_locked condition don’t use $is_privileged_user
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.