ID, '_slms_parent_lesson', true ); $pass_threshold = get_post_meta( $post->ID, '_slms_pass_threshold', true ); $max_retries = get_post_meta( $post->ID, '_slms_max_retries', true ); $time_limit = get_post_meta( $post->ID, '_slms_time_limit', true ); $randomize_questions = (int) get_post_meta( $post->ID, '_slms_randomize_questions', true ); $randomize_options = (int) get_post_meta( $post->ID, '_slms_randomize_options', true ); $show_answers = Quiz_Engine::show_answers_setting( $post->ID ); if ( '' === $pass_threshold ) { $pass_threshold = 70; } if ( '' === $max_retries ) { $max_retries = -1; } if ( '' === $time_limit ) { $time_limit = 0; } // Only parents this user can edit (plus the current one), so an instructor sees their own. $lessons = Capabilities::filter_parent_options( get_posts( array( 'post_type' => 'slms_lesson', 'posts_per_page' => -1, 'post_status' => array( 'publish', 'draft' ), 'orderby' => 'title', 'order' => 'ASC', ) ), (int) $parent_lesson ); ?>


ID, '_slms_questions', true ); if ( ! is_array( $questions ) ) { $questions = array(); } ?>
$q ) : ?>

'', 'type' => 'multiple_choice', 'text' => '', 'options' => array( '', '', '', '' ), 'correct' => 0, 'points' => 1, 'video_url' => '', 'explanation' => '', ); $q = wp_parse_args( $q, $defaults ); $name = "_slms_questions[{$index}]"; $types = Quiz_Engine::question_types(); $builtin = in_array( $q['type'], Quiz_Engine::BUILTIN_TYPES, true ); $missing = ! isset( $types[ $q['type'] ] ); // An add-on's type, with the add-on switched off. if ( ! $builtin ) { // The built-in fields below stay empty (and disabled) for an added type. $q['options'] = array( '', '', '', '' ); $q['correct'] = 0; } ?>
' . ( is_numeric( $index ) ? esc_html( $index + 1 ) : '' ) . '' ); ?>
>

>
$opt ) : ?>
>
$fb_ans ) : ?>